/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @signatureAlgorithm = 'v2';
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('wyota', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model ActivateDeviceRequest {
  uuid?: string(name='Uuid'),
}

model ActivateDeviceResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ActivateDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ActivateDeviceResponseBody(name='body'),
}

/**
 * @summary 设备激活
 *
 * @param request ActivateDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ActivateDeviceResponse
 */
async function activateDeviceWithOptions(request: ActivateDeviceRequest, runtime: Util.RuntimeOptions): ActivateDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ActivateDevice',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 设备激活
 *
 * @param request ActivateDeviceRequest
 * @return ActivateDeviceResponse
 */
async function activateDevice(request: ActivateDeviceRequest): ActivateDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return activateDeviceWithOptions(request, runtime);
}

model AddDeviceFromSNRequest {
  alias?: string(name='Alias'),
  customProperty?: string(name='CustomProperty'),
  groupId?: string(name='GroupId'),
  labelContents?: string(name='LabelContents'),
  secureNetworkType?: string(name='SecureNetworkType'),
  serialNo?: string(name='SerialNo', description='This parameter is required.'),
}

model AddDeviceFromSNResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model AddDeviceFromSNResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddDeviceFromSNResponseBody(name='body'),
}

/**
 * @summary 通过序列号添加设备
 *
 * @param request AddDeviceFromSNRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddDeviceFromSNResponse
 */
async function addDeviceFromSNWithOptions(request: AddDeviceFromSNRequest, runtime: Util.RuntimeOptions): AddDeviceFromSNResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.alias)) {
    body['Alias'] = request.alias;
  }
  if (!Util.isUnset(request.customProperty)) {
    body['CustomProperty'] = request.customProperty;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.labelContents)) {
    body['LabelContents'] = request.labelContents;
  }
  if (!Util.isUnset(request.secureNetworkType)) {
    body['SecureNetworkType'] = request.secureNetworkType;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddDeviceFromSN',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过序列号添加设备
 *
 * @param request AddDeviceFromSNRequest
 * @return AddDeviceFromSNResponse
 */
async function addDeviceFromSN(request: AddDeviceFromSNRequest): AddDeviceFromSNResponse {
  var runtime = new Util.RuntimeOptions{};
  return addDeviceFromSNWithOptions(request, runtime);
}

model AddDeviceSeatsAndLabelsRequest {
  isUnique?: boolean(name='IsUnique'),
  label?: string(name='Label'),
  labelList?: [ string ](name='LabelList'),
  seatName?: string(name='SeatName'),
  serialNo?: string(name='SerialNo'),
  tenantId?: string(name='TenantId'),
  zoneId?: string(name='ZoneId'),
}

model AddDeviceSeatsAndLabelsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model AddDeviceSeatsAndLabelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddDeviceSeatsAndLabelsResponseBody(name='body'),
}

/**
 * @summary 新增设备座位和标签
 *
 * @param request AddDeviceSeatsAndLabelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddDeviceSeatsAndLabelsResponse
 */
async function addDeviceSeatsAndLabelsWithOptions(request: AddDeviceSeatsAndLabelsRequest, runtime: Util.RuntimeOptions): AddDeviceSeatsAndLabelsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.isUnique)) {
    body['IsUnique'] = request.isUnique;
  }
  if (!Util.isUnset(request.label)) {
    body['Label'] = request.label;
  }
  if (!Util.isUnset(request.labelList)) {
    body['LabelList'] = request.labelList;
  }
  if (!Util.isUnset(request.seatName)) {
    body['SeatName'] = request.seatName;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  if (!Util.isUnset(request.zoneId)) {
    body['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddDeviceSeatsAndLabels',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新增设备座位和标签
 *
 * @param request AddDeviceSeatsAndLabelsRequest
 * @return AddDeviceSeatsAndLabelsResponse
 */
async function addDeviceSeatsAndLabels(request: AddDeviceSeatsAndLabelsRequest): AddDeviceSeatsAndLabelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addDeviceSeatsAndLabelsWithOptions(request, runtime);
}

model AddDevicesFromCSVRequest {
  fileName?: string(name='FileName'),
  fileType?: int32(name='FileType'),
  seatCol?: int32(name='SeatCol'),
  siteId?: string(name='SiteId'),
  siteName?: string(name='SiteName'),
}

model AddDevicesFromCSVResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model AddDevicesFromCSVResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddDevicesFromCSVResponseBody(name='body'),
}

/**
 * @summary 通过CSV文件添加设备
 *
 * @param request AddDevicesFromCSVRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddDevicesFromCSVResponse
 */
async function addDevicesFromCSVWithOptions(request: AddDevicesFromCSVRequest, runtime: Util.RuntimeOptions): AddDevicesFromCSVResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.fileName)) {
    body['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.fileType)) {
    body['FileType'] = request.fileType;
  }
  if (!Util.isUnset(request.seatCol)) {
    body['SeatCol'] = request.seatCol;
  }
  if (!Util.isUnset(request.siteId)) {
    body['SiteId'] = request.siteId;
  }
  if (!Util.isUnset(request.siteName)) {
    body['SiteName'] = request.siteName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddDevicesFromCSV',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过CSV文件添加设备
 *
 * @param request AddDevicesFromCSVRequest
 * @return AddDevicesFromCSVResponse
 */
async function addDevicesFromCSV(request: AddDevicesFromCSVRequest): AddDevicesFromCSVResponse {
  var runtime = new Util.RuntimeOptions{};
  return addDevicesFromCSVWithOptions(request, runtime);
}

model AddLabelsRequest {
  labelContents?: string(name='LabelContents'),
}

model AddLabelsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model AddLabelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddLabelsResponseBody(name='body'),
}

/**
 * @summary 添加标签
 *
 * @param request AddLabelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddLabelsResponse
 */
async function addLabelsWithOptions(request: AddLabelsRequest, runtime: Util.RuntimeOptions): AddLabelsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.labelContents)) {
    body['LabelContents'] = request.labelContents;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddLabels',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 添加标签
 *
 * @param request AddLabelsRequest
 * @return AddLabelsResponse
 */
async function addLabels(request: AddLabelsRequest): AddLabelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLabelsWithOptions(request, runtime);
}

model AddOrUpdateDeviceSeatsRequest {
  fileName?: string(name='FileName'),
  userCustomId?: string(name='UserCustomId'),
  zoneId?: string(name='ZoneId'),
}

model AddOrUpdateDeviceSeatsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model AddOrUpdateDeviceSeatsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddOrUpdateDeviceSeatsResponseBody(name='body'),
}

/**
 * @summary 新增或更新设备工位
 *
 * @param request AddOrUpdateDeviceSeatsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddOrUpdateDeviceSeatsResponse
 */
async function addOrUpdateDeviceSeatsWithOptions(request: AddOrUpdateDeviceSeatsRequest, runtime: Util.RuntimeOptions): AddOrUpdateDeviceSeatsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.fileName)) {
    body['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.userCustomId)) {
    body['UserCustomId'] = request.userCustomId;
  }
  if (!Util.isUnset(request.zoneId)) {
    body['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddOrUpdateDeviceSeats',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新增或更新设备工位
 *
 * @param request AddOrUpdateDeviceSeatsRequest
 * @return AddOrUpdateDeviceSeatsResponse
 */
async function addOrUpdateDeviceSeats(request: AddOrUpdateDeviceSeatsRequest): AddOrUpdateDeviceSeatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addOrUpdateDeviceSeatsWithOptions(request, runtime);
}

model AddTerminalRequest {
  alias?: string(name='Alias'),
  serialNumber?: string(name='SerialNumber'),
  terminalGroupId?: string(name='TerminalGroupId'),
}

model AddTerminalResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model AddTerminalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddTerminalResponseBody(name='body'),
}

/**
 * @summary 添加终端
 *
 * @param request AddTerminalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddTerminalResponse
 */
async function addTerminalWithOptions(request: AddTerminalRequest, runtime: Util.RuntimeOptions): AddTerminalResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.alias)) {
    body['Alias'] = request.alias;
  }
  if (!Util.isUnset(request.serialNumber)) {
    body['SerialNumber'] = request.serialNumber;
  }
  if (!Util.isUnset(request.terminalGroupId)) {
    body['TerminalGroupId'] = request.terminalGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddTerminal',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 添加终端
 *
 * @param request AddTerminalRequest
 * @return AddTerminalResponse
 */
async function addTerminal(request: AddTerminalRequest): AddTerminalResponse {
  var runtime = new Util.RuntimeOptions{};
  return addTerminalWithOptions(request, runtime);
}

model AddTerminalsRequest {
  addTerminalParams?: [ 
    {
      alias?: string(name='Alias'),
      clientType?: int32(name='ClientType'),
      serialNumber?: string(name='SerialNumber'),
      terminalGroupId?: string(name='TerminalGroupId'),
      uuid?: string(name='Uuid'),
    }
  ](name='AddTerminalParams'),
}

model AddTerminalsResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      errorCode?: string(name='ErrorCode'),
      serialNumber?: string(name='SerialNumber'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model AddTerminalsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddTerminalsResponseBody(name='body'),
}

/**
 * @summary 添加终端
 *
 * @param request AddTerminalsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddTerminalsResponse
 */
async function addTerminalsWithOptions(request: AddTerminalsRequest, runtime: Util.RuntimeOptions): AddTerminalsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.addTerminalParams)) {
    bodyFlat['AddTerminalParams'] = request.addTerminalParams;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddTerminals',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 添加终端
 *
 * @param request AddTerminalsRequest
 * @return AddTerminalsResponse
 */
async function addTerminals(request: AddTerminalsRequest): AddTerminalsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addTerminalsWithOptions(request, runtime);
}

model AttachEndUsersRequest {
  endUserIds?: string(name='EndUserIds', description='This parameter is required.'),
  serialNo?: string(name='SerialNo', description='This parameter is required.'),
}

model AttachEndUsersResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model AttachEndUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachEndUsersResponseBody(name='body'),
}

/**
 * @summary 设备绑定终端用户
 *
 * @param request AttachEndUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachEndUsersResponse
 */
async function attachEndUsersWithOptions(request: AttachEndUsersRequest, runtime: Util.RuntimeOptions): AttachEndUsersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.endUserIds)) {
    body['EndUserIds'] = request.endUserIds;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AttachEndUsers',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 设备绑定终端用户
 *
 * @param request AttachEndUsersRequest
 * @return AttachEndUsersResponse
 */
async function attachEndUsers(request: AttachEndUsersRequest): AttachEndUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachEndUsersWithOptions(request, runtime);
}

model AttachLabelRequest {
  labelContent?: string(name='LabelContent'),
  labelId?: string(name='LabelId'),
  serialNo?: string(name='SerialNo', description='This parameter is required.'),
}

model AttachLabelResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model AttachLabelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachLabelResponseBody(name='body'),
}

/**
 * @summary 设备绑定标签
 *
 * @param request AttachLabelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachLabelResponse
 */
async function attachLabelWithOptions(request: AttachLabelRequest, runtime: Util.RuntimeOptions): AttachLabelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.labelContent)) {
    body['LabelContent'] = request.labelContent;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AttachLabel',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 设备绑定标签
 *
 * @param request AttachLabelRequest
 * @return AttachLabelResponse
 */
async function attachLabel(request: AttachLabelRequest): AttachLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachLabelWithOptions(request, runtime);
}

model AttachLabelsRequest {
  labelIds?: string(name='LabelIds'),
  serialNo?: string(name='SerialNo'),
  serialNoList?: string(name='SerialNoList'),
}

model AttachLabelsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model AttachLabelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachLabelsResponseBody(name='body'),
}

/**
 * @summary 批量绑定标签
 *
 * @param request AttachLabelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachLabelsResponse
 */
async function attachLabelsWithOptions(request: AttachLabelsRequest, runtime: Util.RuntimeOptions): AttachLabelsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.labelIds)) {
    body['LabelIds'] = request.labelIds;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.serialNoList)) {
    body['SerialNoList'] = request.serialNoList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AttachLabels',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量绑定标签
 *
 * @param request AttachLabelsRequest
 * @return AttachLabelsResponse
 */
async function attachLabels(request: AttachLabelsRequest): AttachLabelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachLabelsWithOptions(request, runtime);
}

model BindAccountLessLoginUserRequest {
  endUserId?: string(name='EndUserId'),
  serialNumber?: string(name='SerialNumber'),
  uuid?: string(name='Uuid'),
}

model BindAccountLessLoginUserResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model BindAccountLessLoginUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindAccountLessLoginUserResponseBody(name='body'),
}

/**
 * @summary 绑定免账号登录用户
 *
 * @param request BindAccountLessLoginUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindAccountLessLoginUserResponse
 */
async function bindAccountLessLoginUserWithOptions(request: BindAccountLessLoginUserRequest, runtime: Util.RuntimeOptions): BindAccountLessLoginUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.endUserId)) {
    body['EndUserId'] = request.endUserId;
  }
  if (!Util.isUnset(request.serialNumber)) {
    body['SerialNumber'] = request.serialNumber;
  }
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BindAccountLessLoginUser',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 绑定免账号登录用户
 *
 * @param request BindAccountLessLoginUserRequest
 * @return BindAccountLessLoginUserResponse
 */
async function bindAccountLessLoginUser(request: BindAccountLessLoginUserRequest): BindAccountLessLoginUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindAccountLessLoginUserWithOptions(request, runtime);
}

model BindPasswordFreeLoginUserRequest {
  endUserId?: string(name='EndUserId'),
  serialNumber?: string(name='SerialNumber'),
  uuid?: string(name='Uuid'),
}

model BindPasswordFreeLoginUserResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model BindPasswordFreeLoginUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindPasswordFreeLoginUserResponseBody(name='body'),
}

/**
 * @summary 绑定免账号登录用户
 *
 * @param request BindPasswordFreeLoginUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindPasswordFreeLoginUserResponse
 */
async function bindPasswordFreeLoginUserWithOptions(request: BindPasswordFreeLoginUserRequest, runtime: Util.RuntimeOptions): BindPasswordFreeLoginUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.endUserId)) {
    body['EndUserId'] = request.endUserId;
  }
  if (!Util.isUnset(request.serialNumber)) {
    body['SerialNumber'] = request.serialNumber;
  }
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BindPasswordFreeLoginUser',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 绑定免账号登录用户
 *
 * @param request BindPasswordFreeLoginUserRequest
 * @return BindPasswordFreeLoginUserResponse
 */
async function bindPasswordFreeLoginUser(request: BindPasswordFreeLoginUserRequest): BindPasswordFreeLoginUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindPasswordFreeLoginUserWithOptions(request, runtime);
}

model CheckUuidValidRequest {
  bluetooth?: string(name='Bluetooth'),
  buildId?: string(name='BuildId'),
  chipId?: string(name='ChipId', description='This parameter is required.'),
  clientId?: string(name='ClientId'),
  customId?: string(name='CustomId', description='This parameter is required.'),
  etherMac?: string(name='EtherMac'),
  serialNo?: string(name='SerialNo', description='This parameter is required.'),
  uuid?: string(name='Uuid', description='This parameter is required.'),
  wlan?: string(name='Wlan'),
  wosAppVersion?: string(name='WosAppVersion'),
}

model CheckUuidValidResponseBody = {
  code?: string(name='Code'),
  data?: {
    newUpgrade?: boolean(name='NewUpgrade'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model CheckUuidValidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckUuidValidResponseBody(name='body'),
}

/**
 * @summary 检查uuid有效性
 *
 * @param request CheckUuidValidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckUuidValidResponse
 */
async function checkUuidValidWithOptions(request: CheckUuidValidRequest, runtime: Util.RuntimeOptions): CheckUuidValidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bluetooth)) {
    body['Bluetooth'] = request.bluetooth;
  }
  if (!Util.isUnset(request.buildId)) {
    body['BuildId'] = request.buildId;
  }
  if (!Util.isUnset(request.chipId)) {
    body['ChipId'] = request.chipId;
  }
  if (!Util.isUnset(request.clientId)) {
    body['ClientId'] = request.clientId;
  }
  if (!Util.isUnset(request.customId)) {
    body['CustomId'] = request.customId;
  }
  if (!Util.isUnset(request.etherMac)) {
    body['EtherMac'] = request.etherMac;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  if (!Util.isUnset(request.wlan)) {
    body['Wlan'] = request.wlan;
  }
  if (!Util.isUnset(request.wosAppVersion)) {
    body['WosAppVersion'] = request.wosAppVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CheckUuidValid',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 检查uuid有效性
 *
 * @param request CheckUuidValidRequest
 * @return CheckUuidValidResponse
 */
async function checkUuidValid(request: CheckUuidValidRequest): CheckUuidValidResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkUuidValidWithOptions(request, runtime);
}

model CreateAppOtaTaskRequest {
  appVersionUid?: string(name='AppVersionUid'),
  channel?: string(name='Channel'),
  clientIdList?: [ string ](name='ClientIdList'),
  clientType?: int32(name='ClientType'),
  creator?: string(name='Creator'),
  description?: string(name='Description'),
  forceUpgrade?: int32(name='ForceUpgrade'),
  label?: string(name='Label'),
  name?: string(name='Name'),
  project?: string(name='Project'),
  regions?: [ string ](name='Regions'),
  status?: int32(name='Status'),
  taskType?: int32(name='TaskType'),
  tenantId?: string(name='TenantId'),
}

model CreateAppOtaTaskResponseBody = {
  code?: string(name='Code'),
  data?: {
    taskUid?: string(name='TaskUid'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model CreateAppOtaTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppOtaTaskResponseBody(name='body'),
}

/**
 * @summary 创建任务
 *
 * @param request CreateAppOtaTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppOtaTaskResponse
 */
async function createAppOtaTaskWithOptions(request: CreateAppOtaTaskRequest, runtime: Util.RuntimeOptions): CreateAppOtaTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appVersionUid)) {
    query['AppVersionUid'] = request.appVersionUid;
  }
  if (!Util.isUnset(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIdList)) {
    query['ClientIdList'] = request.clientIdList;
  }
  if (!Util.isUnset(request.clientType)) {
    query['ClientType'] = request.clientType;
  }
  if (!Util.isUnset(request.creator)) {
    query['Creator'] = request.creator;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.forceUpgrade)) {
    query['ForceUpgrade'] = request.forceUpgrade;
  }
  if (!Util.isUnset(request.label)) {
    query['Label'] = request.label;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.project)) {
    query['Project'] = request.project;
  }
  if (!Util.isUnset(request.regions)) {
    query['Regions'] = request.regions;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.taskType)) {
    query['TaskType'] = request.taskType;
  }
  if (!Util.isUnset(request.tenantId)) {
    query['TenantId'] = request.tenantId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAppOtaTask',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建任务
 *
 * @param request CreateAppOtaTaskRequest
 * @return CreateAppOtaTaskResponse
 */
async function createAppOtaTask(request: CreateAppOtaTaskRequest): CreateAppOtaTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppOtaTaskWithOptions(request, runtime);
}

model CreateAppOtaVersionRequest {
  appVersion?: string(name='AppVersion'),
  arch?: string(name='Arch'),
  channel?: string(name='Channel'),
  clientType?: int32(name='ClientType'),
  creator?: string(name='Creator'),
  downloadUrl?: string(name='DownloadUrl'),
  md5?: string(name='Md5'),
  os?: string(name='Os'),
  osType?: string(name='OsType'),
  otaType?: int32(name='OtaType'),
  project?: string(name='Project'),
  releaseNote?: string(name='ReleaseNote'),
  releaseNoteEn?: string(name='ReleaseNoteEn'),
  releaseNoteJp?: string(name='ReleaseNoteJp'),
  size?: long(name='Size'),
  snapshotId?: string(name='SnapshotId'),
  snapshotRegionId?: string(name='SnapshotRegionId'),
  status?: int32(name='Status'),
  versionType?: string(name='VersionType'),
}

model CreateAppOtaVersionResponseBody = {
  code?: string(name='Code'),
  data?: {
    versionUid?: string(name='VersionUid'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model CreateAppOtaVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppOtaVersionResponseBody(name='body'),
}

/**
 * @summary 创建版本
 *
 * @param request CreateAppOtaVersionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppOtaVersionResponse
 */
async function createAppOtaVersionWithOptions(request: CreateAppOtaVersionRequest, runtime: Util.RuntimeOptions): CreateAppOtaVersionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appVersion)) {
    query['AppVersion'] = request.appVersion;
  }
  if (!Util.isUnset(request.arch)) {
    query['Arch'] = request.arch;
  }
  if (!Util.isUnset(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientType)) {
    query['ClientType'] = request.clientType;
  }
  if (!Util.isUnset(request.creator)) {
    query['Creator'] = request.creator;
  }
  if (!Util.isUnset(request.downloadUrl)) {
    query['DownloadUrl'] = request.downloadUrl;
  }
  if (!Util.isUnset(request.md5)) {
    query['Md5'] = request.md5;
  }
  if (!Util.isUnset(request.os)) {
    query['Os'] = request.os;
  }
  if (!Util.isUnset(request.osType)) {
    query['OsType'] = request.osType;
  }
  if (!Util.isUnset(request.otaType)) {
    query['OtaType'] = request.otaType;
  }
  if (!Util.isUnset(request.project)) {
    query['Project'] = request.project;
  }
  if (!Util.isUnset(request.releaseNote)) {
    query['ReleaseNote'] = request.releaseNote;
  }
  if (!Util.isUnset(request.releaseNoteEn)) {
    query['ReleaseNoteEn'] = request.releaseNoteEn;
  }
  if (!Util.isUnset(request.releaseNoteJp)) {
    query['ReleaseNoteJp'] = request.releaseNoteJp;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  if (!Util.isUnset(request.snapshotId)) {
    query['SnapshotId'] = request.snapshotId;
  }
  if (!Util.isUnset(request.snapshotRegionId)) {
    query['SnapshotRegionId'] = request.snapshotRegionId;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.versionType)) {
    query['VersionType'] = request.versionType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAppOtaVersion',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建版本
 *
 * @param request CreateAppOtaVersionRequest
 * @return CreateAppOtaVersionResponse
 */
async function createAppOtaVersion(request: CreateAppOtaVersionRequest): CreateAppOtaVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppOtaVersionWithOptions(request, runtime);
}

model DeleteAppOtaVersionsRequest {
  versionUidList?: [ string ](name='VersionUidList'),
}

model DeleteAppOtaVersionsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteAppOtaVersionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAppOtaVersionsResponseBody(name='body'),
}

/**
 * @summary 删除版本
 *
 * @param request DeleteAppOtaVersionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAppOtaVersionsResponse
 */
async function deleteAppOtaVersionsWithOptions(request: DeleteAppOtaVersionsRequest, runtime: Util.RuntimeOptions): DeleteAppOtaVersionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.versionUidList)) {
    query['VersionUidList'] = request.versionUidList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAppOtaVersions',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除版本
 *
 * @param request DeleteAppOtaVersionsRequest
 * @return DeleteAppOtaVersionsResponse
 */
async function deleteAppOtaVersions(request: DeleteAppOtaVersionsRequest): DeleteAppOtaVersionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppOtaVersionsWithOptions(request, runtime);
}

model DeleteDevicesRequest {
  force?: string(name='Force', description='This parameter is required.'),
  serialNos?: string(name='SerialNos'),
  uuids?: string(name='Uuids'),
}

model DeleteDevicesResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDevicesResponseBody(name='body'),
}

/**
 * @summary 删除设备
 *
 * @param request DeleteDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDevicesResponse
 */
async function deleteDevicesWithOptions(request: DeleteDevicesRequest, runtime: Util.RuntimeOptions): DeleteDevicesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.uuids)) {
    query['Uuids'] = request.uuids;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.force)) {
    body['Force'] = request.force;
  }
  if (!Util.isUnset(request.serialNos)) {
    body['SerialNos'] = request.serialNos;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDevices',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除设备
 *
 * @param request DeleteDevicesRequest
 * @return DeleteDevicesResponse
 */
async function deleteDevices(request: DeleteDevicesRequest): DeleteDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDevicesWithOptions(request, runtime);
}

model DeleteLabelRequest {
  force?: string(name='Force', description='This parameter is required.'),
  labelContent?: string(name='LabelContent'),
  labelId?: string(name='LabelId'),
}

model DeleteLabelResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteLabelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteLabelResponseBody(name='body'),
}

/**
 * @summary 删除标签
 *
 * @param request DeleteLabelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteLabelResponse
 */
async function deleteLabelWithOptions(request: DeleteLabelRequest, runtime: Util.RuntimeOptions): DeleteLabelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.force)) {
    body['Force'] = request.force;
  }
  if (!Util.isUnset(request.labelContent)) {
    body['LabelContent'] = request.labelContent;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLabel',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除标签
 *
 * @param request DeleteLabelRequest
 * @return DeleteLabelResponse
 */
async function deleteLabel(request: DeleteLabelRequest): DeleteLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLabelWithOptions(request, runtime);
}

model DescribeAppOtaVersionRequest {
  appVersion?: string(name='AppVersion'),
  channel?: string(name='Channel'),
  clientType?: int32(name='ClientType'),
  creator?: string(name='Creator'),
  project?: string(name='Project'),
  status?: int32(name='Status'),
  versionUid?: string(name='VersionUid'),
}

model DescribeAppOtaVersionResponseBody = {
  code?: string(name='Code'),
  data?: {
    appOtaInfoDTOList?: [ 
      {
        appVersion?: string(name='AppVersion'),
        channel?: string(name='Channel'),
        downloadUrl?: string(name='DownloadUrl'),
        fullDownloadUrl?: string(name='FullDownloadUrl'),
        gmtCreate?: string(name='GmtCreate'),
        md5?: string(name='Md5'),
        osType?: string(name='OsType'),
        otaType?: int32(name='OtaType'),
        project?: string(name='Project'),
        protocolType?: string(name='ProtocolType'),
        releaseNote?: string(name='ReleaseNote'),
        releaseNoteEn?: string(name='ReleaseNoteEn'),
        sessionType?: string(name='SessionType'),
        size?: long(name='Size'),
        status?: int32(name='Status'),
        versionCode?: long(name='VersionCode'),
        versionType?: string(name='VersionType'),
        versionUid?: string(name='VersionUid'),
      }
    ](name='AppOtaInfoDTOList'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DescribeAppOtaVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppOtaVersionResponseBody(name='body'),
}

/**
 * @summary 查询版本
 *
 * @param request DescribeAppOtaVersionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppOtaVersionResponse
 */
async function describeAppOtaVersionWithOptions(request: DescribeAppOtaVersionRequest, runtime: Util.RuntimeOptions): DescribeAppOtaVersionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appVersion)) {
    query['AppVersion'] = request.appVersion;
  }
  if (!Util.isUnset(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientType)) {
    query['ClientType'] = request.clientType;
  }
  if (!Util.isUnset(request.creator)) {
    query['Creator'] = request.creator;
  }
  if (!Util.isUnset(request.project)) {
    query['Project'] = request.project;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.versionUid)) {
    query['VersionUid'] = request.versionUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppOtaVersion',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询版本
 *
 * @param request DescribeAppOtaVersionRequest
 * @return DescribeAppOtaVersionResponse
 */
async function describeAppOtaVersion(request: DescribeAppOtaVersionRequest): DescribeAppOtaVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppOtaVersionWithOptions(request, runtime);
}

model DescribeDeviceSeatsRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  serialNo?: string(name='SerialNo'),
  serialNoList?: [ string ](name='SerialNoList'),
  siteId?: string(name='SiteId'),
  tenantId?: string(name='TenantId'),
}

model DescribeDeviceSeatsResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      seatCol?: int32(name='SeatCol'),
      seatName?: string(name='SeatName'),
      seatNo?: string(name='SeatNo'),
      seatRow?: int32(name='SeatRow'),
      serialNo?: string(name='SerialNo'),
      siteId?: string(name='SiteId'),
      siteName?: string(name='SiteName'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model DescribeDeviceSeatsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDeviceSeatsResponseBody(name='body'),
}

/**
 * @summary 查询设备座位
 *
 * @param request DescribeDeviceSeatsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDeviceSeatsResponse
 */
async function describeDeviceSeatsWithOptions(request: DescribeDeviceSeatsRequest, runtime: Util.RuntimeOptions): DescribeDeviceSeatsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.serialNoList)) {
    body['SerialNoList'] = request.serialNoList;
  }
  if (!Util.isUnset(request.siteId)) {
    body['SiteId'] = request.siteId;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDeviceSeats',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询设备座位
 *
 * @param request DescribeDeviceSeatsRequest
 * @return DescribeDeviceSeatsResponse
 */
async function describeDeviceSeats(request: DescribeDeviceSeatsRequest): DescribeDeviceSeatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDeviceSeatsWithOptions(request, runtime);
}

model DescribeDeviceVersionDetailRequest {
  model?: string(name='Model'),
  networkType?: string(name='NetworkType'),
  region?: string(name='Region'),
  versionName?: string(name='VersionName'),
}

model DescribeDeviceVersionDetailResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      androidHorizontalMultiCnImageDownloadUrl?: string(name='AndroidHorizontalMultiCnImageDownloadUrl'),
      androidHorizontalMultiEnImageDownloadUrl?: string(name='AndroidHorizontalMultiEnImageDownloadUrl'),
      androidVerticalMultiCnImageDownloadUrl?: string(name='AndroidVerticalMultiCnImageDownloadUrl'),
      androidVerticalMultiEnImageDownloadUrl?: string(name='AndroidVerticalMultiEnImageDownloadUrl'),
      channel?: string(name='Channel'),
      clientType?: int32(name='ClientType'),
      cnImageDownloadUrl?: string(name='CnImageDownloadUrl'),
      creator?: string(name='Creator'),
      downloadUrl?: string(name='DownloadUrl'),
      enImageDownloadUrl?: string(name='EnImageDownloadUrl'),
      md5?: string(name='Md5'),
      model?: string(name='Model'),
      multiCnImageDownloadUrl?: string(name='MultiCnImageDownloadUrl'),
      multiEnImageDownloadUrl?: string(name='MultiEnImageDownloadUrl'),
      releaseNote?: string(name='ReleaseNote'),
      releaseNoteEn?: string(name='ReleaseNoteEn'),
      size?: long(name='Size'),
      version?: string(name='Version'),
      versionCode?: string(name='VersionCode'),
      versionType?: string(name='VersionType'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DescribeDeviceVersionDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDeviceVersionDetailResponseBody(name='body'),
}

/**
 * @summary 查询版本信息
 *
 * @param request DescribeDeviceVersionDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDeviceVersionDetailResponse
 */
async function describeDeviceVersionDetailWithOptions(request: DescribeDeviceVersionDetailRequest, runtime: Util.RuntimeOptions): DescribeDeviceVersionDetailResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.networkType)) {
    body['NetworkType'] = request.networkType;
  }
  if (!Util.isUnset(request.region)) {
    body['Region'] = request.region;
  }
  if (!Util.isUnset(request.versionName)) {
    body['VersionName'] = request.versionName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDeviceVersionDetail',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询版本信息
 *
 * @param request DescribeDeviceVersionDetailRequest
 * @return DescribeDeviceVersionDetailResponse
 */
async function describeDeviceVersionDetail(request: DescribeDeviceVersionDetailRequest): DescribeDeviceVersionDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDeviceVersionDetailWithOptions(request, runtime);
}

model DescribeSnLabelCountsRequest {
  labelList?: [ string ](name='LabelList'),
  tenantId?: string(name='TenantId'),
  zoneId?: string(name='ZoneId'),
  zoneName?: string(name='ZoneName'),
}

model DescribeSnLabelCountsResponseBody = {
  code?: string(name='Code'),
  data?: {
    labelCountDTOList?: [ 
      {
        count?: string(name='Count'),
        label?: string(name='Label'),
      }
    ](name='LabelCountDTOList'),
    totalCount?: int32(name='TotalCount'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DescribeSnLabelCountsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSnLabelCountsResponseBody(name='body'),
}

/**
 * @summary 查询设备标签数量
 *
 * @param request DescribeSnLabelCountsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSnLabelCountsResponse
 */
async function describeSnLabelCountsWithOptions(request: DescribeSnLabelCountsRequest, runtime: Util.RuntimeOptions): DescribeSnLabelCountsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.labelList)) {
    body['LabelList'] = request.labelList;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  if (!Util.isUnset(request.zoneId)) {
    body['ZoneId'] = request.zoneId;
  }
  if (!Util.isUnset(request.zoneName)) {
    body['ZoneName'] = request.zoneName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSnLabelCounts',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询设备标签数量
 *
 * @param request DescribeSnLabelCountsRequest
 * @return DescribeSnLabelCountsResponse
 */
async function describeSnLabelCounts(request: DescribeSnLabelCountsRequest): DescribeSnLabelCountsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSnLabelCountsWithOptions(request, runtime);
}

model DescribeWorkZonesRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  tenantId?: string(name='TenantId'),
  zoneIdList?: [ string ](name='ZoneIdList'),
  zoneNameList?: [ string ](name='ZoneNameList'),
}

model DescribeWorkZonesResponseBody = {
  code?: string(name='Code'),
  data?: {
    totalCount?: long(name='TotalCount'),
    workZoneDTOList?: [ 
      {
        seatCol?: int32(name='SeatCol'),
        seatRow?: int32(name='SeatRow'),
        tenantId?: string(name='TenantId'),
        zoneId?: string(name='ZoneId'),
        zoneName?: string(name='ZoneName'),
      }
    ](name='WorkZoneDTOList'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DescribeWorkZonesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeWorkZonesResponseBody(name='body'),
}

/**
 * @summary 查询工作区域
 *
 * @param request DescribeWorkZonesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeWorkZonesResponse
 */
async function describeWorkZonesWithOptions(request: DescribeWorkZonesRequest, runtime: Util.RuntimeOptions): DescribeWorkZonesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  if (!Util.isUnset(request.zoneIdList)) {
    body['ZoneIdList'] = request.zoneIdList;
  }
  if (!Util.isUnset(request.zoneNameList)) {
    body['ZoneNameList'] = request.zoneNameList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeWorkZones',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询工作区域
 *
 * @param request DescribeWorkZonesRequest
 * @return DescribeWorkZonesResponse
 */
async function describeWorkZones(request: DescribeWorkZonesRequest): DescribeWorkZonesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeWorkZonesWithOptions(request, runtime);
}

model DetachEndUsersRequest {
  endUserIds?: string(name='EndUserIds', description='This parameter is required.'),
  serialNo?: string(name='SerialNo', description='This parameter is required.'),
}

model DetachEndUsersResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DetachEndUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachEndUsersResponseBody(name='body'),
}

/**
 * @summary 设备解绑终端用户
 *
 * @param request DetachEndUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachEndUsersResponse
 */
async function detachEndUsersWithOptions(request: DetachEndUsersRequest, runtime: Util.RuntimeOptions): DetachEndUsersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.endUserIds)) {
    body['EndUserIds'] = request.endUserIds;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DetachEndUsers',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 设备解绑终端用户
 *
 * @param request DetachEndUsersRequest
 * @return DetachEndUsersResponse
 */
async function detachEndUsers(request: DetachEndUsersRequest): DetachEndUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return detachEndUsersWithOptions(request, runtime);
}

model DetachLabelRequest {
  labelContent?: string(name='LabelContent'),
  labelId?: string(name='LabelId'),
  serialNo?: string(name='SerialNo', description='This parameter is required.'),
}

model DetachLabelResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DetachLabelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachLabelResponseBody(name='body'),
}

/**
 * @summary 设备绑定标签
 *
 * @param request DetachLabelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachLabelResponse
 */
async function detachLabelWithOptions(request: DetachLabelRequest, runtime: Util.RuntimeOptions): DetachLabelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.labelContent)) {
    body['LabelContent'] = request.labelContent;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DetachLabel',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 设备绑定标签
 *
 * @param request DetachLabelRequest
 * @return DetachLabelResponse
 */
async function detachLabel(request: DetachLabelRequest): DetachLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  return detachLabelWithOptions(request, runtime);
}

model DetachLabelsRequest {
  labelIds?: string(name='LabelIds'),
  serialNo?: string(name='SerialNo'),
  serialNoList?: string(name='SerialNoList'),
}

model DetachLabelsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DetachLabelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachLabelsResponseBody(name='body'),
}

/**
 * @summary 批量解绑标签
 *
 * @param request DetachLabelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachLabelsResponse
 */
async function detachLabelsWithOptions(request: DetachLabelsRequest, runtime: Util.RuntimeOptions): DetachLabelsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.labelIds)) {
    body['LabelIds'] = request.labelIds;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.serialNoList)) {
    body['SerialNoList'] = request.serialNoList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DetachLabels',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量解绑标签
 *
 * @param request DetachLabelsRequest
 * @return DetachLabelsResponse
 */
async function detachLabels(request: DetachLabelsRequest): DetachLabelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return detachLabelsWithOptions(request, runtime);
}

model GenerateOssUrlRequest {
  objectNameList?: [ string ](name='ObjectNameList'),
  sessionId?: string(name='SessionId'),
}

model GenerateOssUrlResponseBody = {
  data?: [ 
    {
      downloadUrl?: string(name='DownloadUrl'),
      objectName?: string(name='ObjectName'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model GenerateOssUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GenerateOssUrlResponseBody(name='body'),
}

/**
 * @summary 查询用户上传的文件
 *
 * @param request GenerateOssUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GenerateOssUrlResponse
 */
async function generateOssUrlWithOptions(request: GenerateOssUrlRequest, runtime: Util.RuntimeOptions): GenerateOssUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.objectNameList)) {
    body['ObjectNameList'] = request.objectNameList;
  }
  if (!Util.isUnset(request.sessionId)) {
    body['SessionId'] = request.sessionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GenerateOssUrl',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户上传的文件
 *
 * @param request GenerateOssUrlRequest
 * @return GenerateOssUrlResponse
 */
async function generateOssUrl(request: GenerateOssUrlRequest): GenerateOssUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return generateOssUrlWithOptions(request, runtime);
}

model GetAppOtaLatestVersionRequest {
  baseVersion?: string(name='BaseVersion', description='This parameter is required.'),
  clientType?: int32(name='ClientType'),
  clientUid?: string(name='ClientUid'),
  osType?: string(name='OsType', description='This parameter is required.'),
  project?: string(name='Project'),
}

model GetAppOtaLatestVersionResponseBody = {
  code?: string(name='Code'),
  data?: {
    appVersion?: string(name='AppVersion'),
    downloadUrl?: string(name='DownloadUrl'),
    forceUpgrade?: int32(name='ForceUpgrade'),
    md5?: string(name='Md5'),
    releaseNote?: string(name='ReleaseNote'),
    size?: long(name='Size'),
    taskUid?: string(name='TaskUid'),
    versionCode?: string(name='VersionCode'),
    versionType?: string(name='VersionType'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetAppOtaLatestVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAppOtaLatestVersionResponseBody(name='body'),
}

/**
 * @summary 获取应用最新版本
 *
 * @param request GetAppOtaLatestVersionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAppOtaLatestVersionResponse
 */
async function getAppOtaLatestVersionWithOptions(request: GetAppOtaLatestVersionRequest, runtime: Util.RuntimeOptions): GetAppOtaLatestVersionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.baseVersion)) {
    query['BaseVersion'] = request.baseVersion;
  }
  if (!Util.isUnset(request.clientType)) {
    query['ClientType'] = request.clientType;
  }
  if (!Util.isUnset(request.clientUid)) {
    query['ClientUid'] = request.clientUid;
  }
  if (!Util.isUnset(request.osType)) {
    query['OsType'] = request.osType;
  }
  if (!Util.isUnset(request.project)) {
    query['Project'] = request.project;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAppOtaLatestVersion',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取应用最新版本
 *
 * @param request GetAppOtaLatestVersionRequest
 * @return GetAppOtaLatestVersionResponse
 */
async function getAppOtaLatestVersion(request: GetAppOtaLatestVersionRequest): GetAppOtaLatestVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAppOtaLatestVersionWithOptions(request, runtime);
}

model GetDeviceConfigsRequest {
  deviceId?: string(name='DeviceId'),
  networkType?: string(name='NetworkType'),
  region?: string(name='Region'),
  serialNo?: string(name='SerialNo'),
  urclVersion?: string(name='UrclVersion'),
  userCustomId?: string(name='UserCustomId'),
}

model GetDeviceConfigsResponseBody = {
  code?: string(name='Code'),
  data?: {
    autoLockScreenTime?: int32(name='AutoLockScreenTime'),
    autoLogin?: int32(name='AutoLogin'),
    autoUpdate?: int32(name='AutoUpdate'),
    customIdleAction?: int32(name='CustomIdleAction'),
    customPowerOn?: int32(name='CustomPowerOn'),
    customResourcePackage?: {
      configAboutLogo?: string(name='ConfigAboutLogo'),
      desktopWallpaper?: string(name='DesktopWallpaper'),
      loginPageBackground?: string(name='LoginPageBackground'),
      loginPageLogo?: string(name='LoginPageLogo'),
      personalCenterLogo?: string(name='PersonalCenterLogo'),
      startLogo?: string(name='StartLogo'),
      startMenuLogo?: string(name='StartMenuLogo'),
      upgradeLogo?: string(name='UpgradeLogo'),
    }(name='CustomResourcePackage'),
    definePowerButton?: int32(name='DefinePowerButton'),
    deviceLock?: int32(name='DeviceLock'),
    displayLayout?: string(name='DisplayLayout'),
    displayResolution?: string(name='DisplayResolution'),
    displayScaleRatio?: string(name='DisplayScaleRatio'),
    enableAdb?: int32(name='EnableAdb'),
    enableAutoLockScreen?: int32(name='EnableAutoLockScreen'),
    enableBluetooth?: int32(name='EnableBluetooth'),
    enableLockScreenPassword?: int32(name='EnableLockScreenPassword'),
    enableModifyPassword?: int32(name='EnableModifyPassword'),
    enableScheduledPowerOff?: int32(name='EnableScheduledPowerOff'),
    enableUnlockPassword?: int32(name='EnableUnlockPassword'),
    enableWlan?: int32(name='EnableWlan'),
    idleTime?: int32(name='IdleTime'),
    localUsbPrint?: int32(name='LocalUsbPrint'),
    lockPassword?: string(name='LockPassword'),
    scheduledPowerOff?: string(name='ScheduledPowerOff'),
    secureNetworkType?: string(name='SecureNetworkType'),
    serialNo?: string(name='SerialNo'),
    sleepTime?: int32(name='SleepTime'),
    urcl?: string(name='Urcl'),
    usbStorage?: int32(name='UsbStorage'),
    userCustomId?: string(name='UserCustomId'),
    uuid?: string(name='Uuid'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetDeviceConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceConfigsResponseBody(name='body'),
}

/**
 * @summary 获取设备配置
 *
 * @param request GetDeviceConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceConfigsResponse
 */
async function getDeviceConfigsWithOptions(request: GetDeviceConfigsRequest, runtime: Util.RuntimeOptions): GetDeviceConfigsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.networkType)) {
    body['NetworkType'] = request.networkType;
  }
  if (!Util.isUnset(request.region)) {
    body['Region'] = request.region;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.urclVersion)) {
    body['UrclVersion'] = request.urclVersion;
  }
  if (!Util.isUnset(request.userCustomId)) {
    body['UserCustomId'] = request.userCustomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceConfigs',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备配置
 *
 * @param request GetDeviceConfigsRequest
 * @return GetDeviceConfigsResponse
 */
async function getDeviceConfigs(request: GetDeviceConfigsRequest): GetDeviceConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceConfigsWithOptions(request, runtime);
}

model GetDeviceOtaAutoStatusRequest {
  clientType?: int32(name='ClientType'),
}

model GetDeviceOtaAutoStatusResponseBody = {
  code?: string(name='Code'),
  data?: {
    autoUpdate?: int32(name='AutoUpdate'),
    autoUpdateTimeSchedule?: string(name='AutoUpdateTimeSchedule'),
    forceUpgrade?: int32(name='ForceUpgrade'),
    status?: int32(name='Status'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetDeviceOtaAutoStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceOtaAutoStatusResponseBody(name='body'),
}

/**
 * @summary 获取是否开启自动升级状态
 *
 * @param request GetDeviceOtaAutoStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceOtaAutoStatusResponse
 */
async function getDeviceOtaAutoStatusWithOptions(request: GetDeviceOtaAutoStatusRequest, runtime: Util.RuntimeOptions): GetDeviceOtaAutoStatusResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientType)) {
    body['ClientType'] = request.clientType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceOtaAutoStatus',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取是否开启自动升级状态
 *
 * @param request GetDeviceOtaAutoStatusRequest
 * @return GetDeviceOtaAutoStatusResponse
 */
async function getDeviceOtaAutoStatus(request: GetDeviceOtaAutoStatusRequest): GetDeviceOtaAutoStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceOtaAutoStatusWithOptions(request, runtime);
}

model GetDeviceOtaInfoRequest {
  baseVersion?: string(name='BaseVersion', description='This parameter is required.'),
  channel?: string(name='Channel'),
  deviceId?: string(name='DeviceId', description='This parameter is required.'),
  model?: string(name='Model', description='This parameter is required.'),
  networkType?: string(name='NetworkType'),
  osVersion?: string(name='OsVersion'),
  region?: string(name='Region'),
  regionId?: string(name='RegionId'),
  targetVersionType?: string(name='TargetVersionType'),
  tenantId?: string(name='TenantId'),
}

model GetDeviceOtaInfoResponseBody = {
  code?: string(name='Code'),
  data?: {
    version?: {
      androidHorizontalMultiCnImageDownloadUrl?: string(name='AndroidHorizontalMultiCnImageDownloadUrl'),
      androidHorizontalMultiEnImageDownloadUrl?: string(name='AndroidHorizontalMultiEnImageDownloadUrl'),
      androidVerticalMultiCnImageDownloadUrl?: string(name='AndroidVerticalMultiCnImageDownloadUrl'),
      androidVerticalMultiEnImageDownloadUrl?: string(name='AndroidVerticalMultiEnImageDownloadUrl'),
      cnImageDownloadUrl?: string(name='CnImageDownloadUrl'),
      creator?: string(name='Creator'),
      customForceUpgrade?: boolean(name='CustomForceUpgrade'),
      downloadUrl?: string(name='DownloadUrl'),
      enImageDownloadUrl?: string(name='EnImageDownloadUrl'),
      forceUpgrade?: int32(name='ForceUpgrade'),
      isAppDownloadUrl?: boolean(name='IsAppDownloadUrl'),
      localDownloadUrl?: string(name='LocalDownloadUrl'),
      md5?: string(name='Md5'),
      model?: string(name='Model'),
      multiCnImageDownloadUrl?: string(name='MultiCnImageDownloadUrl'),
      multiEnImageDownloadUrl?: string(name='MultiEnImageDownloadUrl'),
      releaseNote?: string(name='ReleaseNote'),
      releaseNoteEn?: string(name='ReleaseNoteEn'),
      size?: long(name='Size'),
      version?: string(name='Version'),
      versionCode?: string(name='VersionCode'),
      versionType?: string(name='VersionType'),
    }(name='Version'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetDeviceOtaInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceOtaInfoResponseBody(name='body'),
}

/**
 * @summary 获取设备升级信息
 *
 * @param request GetDeviceOtaInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceOtaInfoResponse
 */
async function getDeviceOtaInfoWithOptions(request: GetDeviceOtaInfoRequest, runtime: Util.RuntimeOptions): GetDeviceOtaInfoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.baseVersion)) {
    body['BaseVersion'] = request.baseVersion;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.networkType)) {
    body['NetworkType'] = request.networkType;
  }
  if (!Util.isUnset(request.osVersion)) {
    body['OsVersion'] = request.osVersion;
  }
  if (!Util.isUnset(request.region)) {
    body['Region'] = request.region;
  }
  if (!Util.isUnset(request.regionId)) {
    body['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.targetVersionType)) {
    body['TargetVersionType'] = request.targetVersionType;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceOtaInfo',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备升级信息
 *
 * @param request GetDeviceOtaInfoRequest
 * @return GetDeviceOtaInfoResponse
 */
async function getDeviceOtaInfo(request: GetDeviceOtaInfoRequest): GetDeviceOtaInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceOtaInfoWithOptions(request, runtime);
}

model GetDeviceOtaInfoTestRequest {
  baseVersion?: string(name='BaseVersion', description='This parameter is required.'),
  deviceId?: string(name='DeviceId', description='This parameter is required.'),
  model?: string(name='Model', description='This parameter is required.'),
  tenantId?: string(name='TenantId'),
}

model GetDeviceOtaInfoTestResponseBody = {
  code?: string(name='Code'),
  data?: {
    version?: {
      creator?: string(name='Creator'),
      downloadUrl?: string(name='DownloadUrl'),
      forceUpgrade?: int32(name='ForceUpgrade'),
      localDownloadUrl?: string(name='LocalDownloadUrl'),
      md5?: string(name='Md5'),
      model?: string(name='Model'),
      releaseNote?: string(name='ReleaseNote'),
      size?: long(name='Size'),
      version?: string(name='Version'),
      versionCode?: string(name='VersionCode'),
      versionType?: string(name='VersionType'),
    }(name='Version'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetDeviceOtaInfoTestResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceOtaInfoTestResponseBody(name='body'),
}

/**
 * @summary 获取设备升级信息
 *
 * @param request GetDeviceOtaInfoTestRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceOtaInfoTestResponse
 */
async function getDeviceOtaInfoTestWithOptions(request: GetDeviceOtaInfoTestRequest, runtime: Util.RuntimeOptions): GetDeviceOtaInfoTestResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.baseVersion)) {
    body['BaseVersion'] = request.baseVersion;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceOtaInfoTest',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备升级信息
 *
 * @param request GetDeviceOtaInfoTestRequest
 * @return GetDeviceOtaInfoTestResponse
 */
async function getDeviceOtaInfoTest(request: GetDeviceOtaInfoTestRequest): GetDeviceOtaInfoTestResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceOtaInfoTestWithOptions(request, runtime);
}

model GetDeviceOtaTaskVersionInfoRequest {
  taskId?: string(name='TaskId', description='This parameter is required.'),
}

model GetDeviceOtaTaskVersionInfoResponseBody = {
  code?: string(name='Code'),
  data?: {
    releaseNote?: string(name='ReleaseNote'),
    size?: long(name='Size'),
    version?: string(name='Version'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetDeviceOtaTaskVersionInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceOtaTaskVersionInfoResponseBody(name='body'),
}

/**
 * @summary 获取租户任务版本信息
 *
 * @param request GetDeviceOtaTaskVersionInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceOtaTaskVersionInfoResponse
 */
async function getDeviceOtaTaskVersionInfoWithOptions(request: GetDeviceOtaTaskVersionInfoRequest, runtime: Util.RuntimeOptions): GetDeviceOtaTaskVersionInfoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceOtaTaskVersionInfo',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取租户任务版本信息
 *
 * @param request GetDeviceOtaTaskVersionInfoRequest
 * @return GetDeviceOtaTaskVersionInfoResponse
 */
async function getDeviceOtaTaskVersionInfo(request: GetDeviceOtaTaskVersionInfoRequest): GetDeviceOtaTaskVersionInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceOtaTaskVersionInfoWithOptions(request, runtime);
}

model GetDeviceUpgradeStatusRequest {
  appVersion?: string(name='AppVersion'),
  clientUid?: string(name='ClientUid'),
  project?: string(name='Project'),
  taskUid?: string(name='TaskUid'),
}

model GetDeviceUpgradeStatusResponseBody = {
  code?: string(name='Code'),
  data?: {
    appOtaStatusDTOList?: [ 
      {
        baseVersion?: string(name='BaseVersion'),
        clientType?: int32(name='ClientType'),
        clientUid?: string(name='ClientUid'),
        note?: string(name='Note'),
        osType?: string(name='OsType'),
        project?: string(name='Project'),
        status?: int32(name='Status'),
        targetVersion?: string(name='TargetVersion'),
        taskUid?: string(name='TaskUid'),
      }
    ](name='AppOtaStatusDTOList'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetDeviceUpgradeStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceUpgradeStatusResponseBody(name='body'),
}

/**
 * @summary 获得设备升级详情
 *
 * @param request GetDeviceUpgradeStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceUpgradeStatusResponse
 */
async function getDeviceUpgradeStatusWithOptions(request: GetDeviceUpgradeStatusRequest, runtime: Util.RuntimeOptions): GetDeviceUpgradeStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appVersion)) {
    query['AppVersion'] = request.appVersion;
  }
  if (!Util.isUnset(request.clientUid)) {
    query['ClientUid'] = request.clientUid;
  }
  if (!Util.isUnset(request.project)) {
    query['Project'] = request.project;
  }
  if (!Util.isUnset(request.taskUid)) {
    query['TaskUid'] = request.taskUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceUpgradeStatus',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获得设备升级详情
 *
 * @param request GetDeviceUpgradeStatusRequest
 * @return GetDeviceUpgradeStatusResponse
 */
async function getDeviceUpgradeStatus(request: GetDeviceUpgradeStatusRequest): GetDeviceUpgradeStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceUpgradeStatusWithOptions(request, runtime);
}

model GetExportDeviceInfoOssUrlRequest {
  tenantId?: string(name='TenantId'),
  zoneId?: string(name='ZoneId'),
  zoneName?: string(name='ZoneName'),
}

model GetExportDeviceInfoOssUrlResponseBody = {
  code?: string(name='Code'),
  data?: {
    url?: string(name='Url'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetExportDeviceInfoOssUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetExportDeviceInfoOssUrlResponseBody(name='body'),
}

/**
 * @summary 导出设备工位列表
 *
 * @param request GetExportDeviceInfoOssUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetExportDeviceInfoOssUrlResponse
 */
async function getExportDeviceInfoOssUrlWithOptions(request: GetExportDeviceInfoOssUrlRequest, runtime: Util.RuntimeOptions): GetExportDeviceInfoOssUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  if (!Util.isUnset(request.zoneId)) {
    body['ZoneId'] = request.zoneId;
  }
  if (!Util.isUnset(request.zoneName)) {
    body['ZoneName'] = request.zoneName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetExportDeviceInfoOssUrl',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导出设备工位列表
 *
 * @param request GetExportDeviceInfoOssUrlRequest
 * @return GetExportDeviceInfoOssUrlResponse
 */
async function getExportDeviceInfoOssUrl(request: GetExportDeviceInfoOssUrlRequest): GetExportDeviceInfoOssUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getExportDeviceInfoOssUrlWithOptions(request, runtime);
}

model GetFbOssConfigRequest {
  dirPrefix?: string(name='DirPrefix'),
  isDedicatedLine?: int32(name='IsDedicatedLine'),
  region?: string(name='Region'),
}

model GetFbOssConfigResponseBody = {
  code?: string(name='Code'),
  data?: {
    accessKeyId?: string(name='AccessKeyId'),
    endPoint?: string(name='EndPoint'),
    ossPolicy?: string(name='OssPolicy'),
    ossSignature?: string(name='OssSignature'),
    sessionId?: string(name='SessionId'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetFbOssConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetFbOssConfigResponseBody(name='body'),
}

/**
 * @summary 查询OSS配置信息
 *
 * @param request GetFbOssConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetFbOssConfigResponse
 */
async function getFbOssConfigWithOptions(request: GetFbOssConfigRequest, runtime: Util.RuntimeOptions): GetFbOssConfigResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dirPrefix)) {
    body['DirPrefix'] = request.dirPrefix;
  }
  if (!Util.isUnset(request.isDedicatedLine)) {
    body['IsDedicatedLine'] = request.isDedicatedLine;
  }
  if (!Util.isUnset(request.region)) {
    body['Region'] = request.region;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetFbOssConfig',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询OSS配置信息
 *
 * @param request GetFbOssConfigRequest
 * @return GetFbOssConfigResponse
 */
async function getFbOssConfig(request: GetFbOssConfigRequest): GetFbOssConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getFbOssConfigWithOptions(request, runtime);
}

model GetOssConfigRequest {
  type?: int32(name='Type'),
}

model GetOssConfigResponseBody = {
  code?: string(name='Code'),
  data?: {
    accessKeyId?: string(name='AccessKeyId'),
    endPoint?: string(name='EndPoint'),
    ossPolicy?: string(name='OssPolicy'),
    ossSignature?: string(name='OssSignature'),
    securityToken?: string(name='SecurityToken'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetOssConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetOssConfigResponseBody(name='body'),
}

/**
 * @summary 获取OSS配置
 *
 * @param request GetOssConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetOssConfigResponse
 */
async function getOssConfigWithOptions(request: GetOssConfigRequest, runtime: Util.RuntimeOptions): GetOssConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetOssConfig',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取OSS配置
 *
 * @param request GetOssConfigRequest
 * @return GetOssConfigResponse
 */
async function getOssConfig(request: GetOssConfigRequest): GetOssConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOssConfigWithOptions(request, runtime);
}

model GetVersionDownloadUrlRequest {
  versionName?: string(name='VersionName'),
}

model GetVersionDownloadUrlResponseBody = {
  code?: string(name='Code'),
  data?: {
    fullDownloadUrl?: string(name='FullDownloadUrl'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetVersionDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetVersionDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 获取版本下载地址
 *
 * @param request GetVersionDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetVersionDownloadUrlResponse
 */
async function getVersionDownloadUrlWithOptions(request: GetVersionDownloadUrlRequest, runtime: Util.RuntimeOptions): GetVersionDownloadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.versionName)) {
    query['VersionName'] = request.versionName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetVersionDownloadUrl',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取版本下载地址
 *
 * @param request GetVersionDownloadUrlRequest
 * @return GetVersionDownloadUrlResponse
 */
async function getVersionDownloadUrl(request: GetVersionDownloadUrlRequest): GetVersionDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVersionDownloadUrlWithOptions(request, runtime);
}

model ListDeviceOtaTaskByTenantRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListDeviceOtaTaskByTenantResponseBody = {
  code?: string(name='Code'),
  data?: {
    tenantDeviceOtaTasks?: [ 
      {
        model?: string(name='Model'),
        operationStatus?: int32(name='OperationStatus'),
        publishTime?: string(name='PublishTime'),
        status?: int32(name='Status'),
        taskId?: int32(name='TaskId'),
        upgradeCount?: long(name='UpgradeCount'),
        version?: string(name='Version'),
      }
    ](name='TenantDeviceOtaTasks'),
  }(name='Data'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListDeviceOtaTaskByTenantResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDeviceOtaTaskByTenantResponseBody(name='body'),
}

/**
 * @summary 获取租户ota任务
 *
 * @param request ListDeviceOtaTaskByTenantRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDeviceOtaTaskByTenantResponse
 */
async function listDeviceOtaTaskByTenantWithOptions(request: ListDeviceOtaTaskByTenantRequest, runtime: Util.RuntimeOptions): ListDeviceOtaTaskByTenantResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceOtaTaskByTenant',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取租户ota任务
 *
 * @param request ListDeviceOtaTaskByTenantRequest
 * @return ListDeviceOtaTaskByTenantResponse
 */
async function listDeviceOtaTaskByTenant(request: ListDeviceOtaTaskByTenantRequest): ListDeviceOtaTaskByTenantResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeviceOtaTaskByTenantWithOptions(request, runtime);
}

model ListDeviceSeatsRequest {
  label?: string(name='Label'),
  seatNo?: string(name='SeatNo'),
  serialNoList?: [ string ](name='SerialNoList'),
  tenantId?: string(name='TenantId'),
  zoneId?: string(name='ZoneId'),
}

model ListDeviceSeatsResponseBody = {
  code?: string(name='Code'),
  data?: {
    deviceSeatDTOList?: [ 
      {
        label?: string(name='Label'),
        seatName?: string(name='SeatName'),
        seatNo?: string(name='SeatNo'),
        serialNo?: string(name='SerialNo'),
        siteId?: string(name='SiteId'),
        siteName?: string(name='SiteName'),
        zoneId?: string(name='ZoneId'),
      }
    ](name='DeviceSeatDTOList'),
    totalCount?: long(name='TotalCount'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListDeviceSeatsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDeviceSeatsResponseBody(name='body'),
}

/**
 * @summary 查询设备座位列表
 *
 * @param request ListDeviceSeatsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDeviceSeatsResponse
 */
async function listDeviceSeatsWithOptions(request: ListDeviceSeatsRequest, runtime: Util.RuntimeOptions): ListDeviceSeatsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.label)) {
    body['Label'] = request.label;
  }
  if (!Util.isUnset(request.seatNo)) {
    body['SeatNo'] = request.seatNo;
  }
  if (!Util.isUnset(request.serialNoList)) {
    body['SerialNoList'] = request.serialNoList;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  if (!Util.isUnset(request.zoneId)) {
    body['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceSeats',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询设备座位列表
 *
 * @param request ListDeviceSeatsRequest
 * @return ListDeviceSeatsResponse
 */
async function listDeviceSeats(request: ListDeviceSeatsRequest): ListDeviceSeatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeviceSeatsWithOptions(request, runtime);
}

model ListDevicesRequest {
  alias?: string(name='Alias'),
  buildId?: string(name='BuildId'),
  clientType?: int32(name='ClientType'),
  deviceGroupId?: string(name='DeviceGroupId'),
  deviceIpV4?: string(name='DeviceIpV4'),
  deviceName?: string(name='DeviceName'),
  deviceOS?: string(name='DeviceOS'),
  devicePlatform?: string(name='DevicePlatform'),
  endUserId?: string(name='EndUserId'),
  labelContent?: string(name='LabelContent'),
  labelId?: string(name='LabelId'),
  locationInfo?: string(name='LocationInfo'),
  model?: string(name='Model'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  serialNo?: string(name='SerialNo'),
  userType?: string(name='UserType'),
  uuid?: string(name='Uuid'),
}

model ListDevicesResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      activeTime?: string(name='ActiveTime'),
      alias?: string(name='Alias'),
      autoLockScreenTime?: int32(name='AutoLockScreenTime'),
      autoLogin?: int32(name='AutoLogin'),
      autoType?: string(name='AutoType'),
      bluetooth?: string(name='Bluetooth'),
      buildId?: string(name='BuildId'),
      clientId?: string(name='ClientId'),
      clientType?: string(name='ClientType'),
      connectConfigs?: [ 
        {
          connectScript?: string(name='ConnectScript'),
          peripheralPid?: string(name='PeripheralPid'),
          peripheralVid?: string(name='PeripheralVid'),
          redirectPolicy?: int32(name='RedirectPolicy'),
        }
      ](name='ConnectConfigs'),
      customIdleAction?: int32(name='CustomIdleAction'),
      customPowerOn?: int32(name='CustomPowerOn'),
      customProperty?: string(name='CustomProperty'),
      customResourcePackage?: {
        configAboutLogo?: string(name='ConfigAboutLogo'),
        desktopWallpaper?: string(name='DesktopWallpaper'),
        loginPageBackground?: string(name='LoginPageBackground'),
        loginPageLogo?: string(name='LoginPageLogo'),
        personalCenterLogo?: string(name='PersonalCenterLogo'),
        startLogo?: string(name='StartLogo'),
        startMenuLogo?: string(name='StartMenuLogo'),
        upgradeLogo?: string(name='UpgradeLogo'),
      }(name='CustomResourcePackage'),
      definePowerButton?: int32(name='DefinePowerButton'),
      deviceIpV4?: string(name='DeviceIpV4'),
      deviceLock?: int32(name='DeviceLock'),
      deviceMqttConnectionStatus?: int32(name='DeviceMqttConnectionStatus'),
      deviceName?: string(name='DeviceName'),
      deviceOS?: string(name='DeviceOS'),
      devicePlatform?: string(name='DevicePlatform'),
      displayLayout?: string(name='DisplayLayout'),
      displayResolution?: string(name='DisplayResolution'),
      displayScaleRatio?: string(name='DisplayScaleRatio'),
      enableAdb?: int32(name='EnableAdb'),
      enableAutoLockScreen?: int32(name='EnableAutoLockScreen'),
      enableBluetooth?: int32(name='EnableBluetooth'),
      enableLockScreenPassword?: int32(name='EnableLockScreenPassword'),
      enableModifyPassword?: int32(name='EnableModifyPassword'),
      enableScheduledPowerOff?: int32(name='EnableScheduledPowerOff'),
      enableUnlockPassword?: int32(name='EnableUnlockPassword'),
      enableWlan?: int32(name='EnableWlan'),
      endUserList?: [ 
        {
          adDomain?: string(name='AdDomain'),
          bindTime?: string(name='BindTime'),
          directoryId?: string(name='DirectoryId'),
          endUserId?: string(name='EndUserId'),
          id?: long(name='Id'),
          serialNo?: string(name='SerialNo'),
          tenantId?: string(name='TenantId'),
          userType?: string(name='UserType'),
        }
      ](name='EndUserList'),
      etherMac?: string(name='EtherMac'),
      gmtModified?: string(name='GmtModified'),
      gmtSync?: string(name='GmtSync'),
      id?: long(name='Id'),
      idleTime?: int32(name='IdleTime'),
      isActive?: string(name='IsActive'),
      labelList?: [ 
        {
          content?: string(name='Content'),
          gmtCreate?: long(name='GmtCreate'),
          gmtModified?: long(name='GmtModified'),
          labelId?: string(name='LabelId'),
          tenantId?: string(name='TenantId'),
        }
      ](name='LabelList'),
      lastLoginUser?: string(name='LastLoginUser'),
      localUsbPrint?: int32(name='LocalUsbPrint'),
      locationInfo?: string(name='LocationInfo'),
      lockPassword?: string(name='LockPassword'),
      model?: string(name='Model'),
      orderId?: string(name='OrderId'),
      peripheralConfig?: {
        defaultPolicy?: int32(name='DefaultPolicy'),
        policyStrategy?: int32(name='PolicyStrategy'),
        usbAndInternalCamera?: int32(name='UsbAndInternalCamera'),
        usbPrinter?: int32(name='UsbPrinter'),
        usbStorage?: int32(name='UsbStorage'),
      }(name='PeripheralConfig'),
      scheduledPowerOff?: string(name='ScheduledPowerOff'),
      secureNetworkType?: string(name='SecureNetworkType'),
      serialNo?: string(name='SerialNo'),
      sleepTime?: int32(name='SleepTime'),
      source?: string(name='Source'),
      tenantId?: string(name='TenantId'),
      usbStorage?: int32(name='UsbStorage'),
      uuid?: string(name='Uuid'),
      wlan?: string(name='Wlan'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDevicesResponseBody(name='body'),
}

/**
 * @summary 获取设备列表
 *
 * @param request ListDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDevicesResponse
 */
async function listDevicesWithOptions(request: ListDevicesRequest, runtime: Util.RuntimeOptions): ListDevicesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientType)) {
    query['ClientType'] = request.clientType;
  }
  if (!Util.isUnset(request.deviceIpV4)) {
    query['DeviceIpV4'] = request.deviceIpV4;
  }
  if (!Util.isUnset(request.deviceName)) {
    query['DeviceName'] = request.deviceName;
  }
  if (!Util.isUnset(request.deviceOS)) {
    query['DeviceOS'] = request.deviceOS;
  }
  if (!Util.isUnset(request.devicePlatform)) {
    query['DevicePlatform'] = request.devicePlatform;
  }
  if (!Util.isUnset(request.locationInfo)) {
    query['LocationInfo'] = request.locationInfo;
  }
  if (!Util.isUnset(request.userType)) {
    query['UserType'] = request.userType;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.alias)) {
    body['Alias'] = request.alias;
  }
  if (!Util.isUnset(request.buildId)) {
    body['BuildId'] = request.buildId;
  }
  if (!Util.isUnset(request.deviceGroupId)) {
    body['DeviceGroupId'] = request.deviceGroupId;
  }
  if (!Util.isUnset(request.endUserId)) {
    body['EndUserId'] = request.endUserId;
  }
  if (!Util.isUnset(request.labelContent)) {
    body['LabelContent'] = request.labelContent;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListDevices',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备列表
 *
 * @param request ListDevicesRequest
 * @return ListDevicesResponse
 */
async function listDevices(request: ListDevicesRequest): ListDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDevicesWithOptions(request, runtime);
}

model ListFbIssueLabelsResponseBody = {
  code?: string(name='Code'),
  data?: {
    issueLabel?: [ string ](name='IssueLabel'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListFbIssueLabelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListFbIssueLabelsResponseBody(name='body'),
}

/**
 * @summary 查询用户问题标签
 *
 * @param request ListFbIssueLabelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListFbIssueLabelsResponse
 */
async function listFbIssueLabelsWithOptions(runtime: Util.RuntimeOptions): ListFbIssueLabelsResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListFbIssueLabels',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户问题标签
 *
 * @return ListFbIssueLabelsResponse
 */
async function listFbIssueLabels(): ListFbIssueLabelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFbIssueLabelsWithOptions(runtime);
}

model ListFbIssueLabelsByLCRequest {
  caller?: string(name='Caller'),
  languageType?: string(name='LanguageType'),
}

model ListFbIssueLabelsByLCResponseBody = {
  code?: string(name='Code'),
  data?: {
    issueLabel?: [ string ](name='IssueLabel'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListFbIssueLabelsByLCResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListFbIssueLabelsByLCResponseBody(name='body'),
}

/**
 * @summary 根据语言类型和调用方查询标签列表
 *
 * @param request ListFbIssueLabelsByLCRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListFbIssueLabelsByLCResponse
 */
async function listFbIssueLabelsByLCWithOptions(request: ListFbIssueLabelsByLCRequest, runtime: Util.RuntimeOptions): ListFbIssueLabelsByLCResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.caller)) {
    body['Caller'] = request.caller;
  }
  if (!Util.isUnset(request.languageType)) {
    body['LanguageType'] = request.languageType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListFbIssueLabelsByLC',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据语言类型和调用方查询标签列表
 *
 * @param request ListFbIssueLabelsByLCRequest
 * @return ListFbIssueLabelsByLCResponse
 */
async function listFbIssueLabelsByLC(request: ListFbIssueLabelsByLCRequest): ListFbIssueLabelsByLCResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFbIssueLabelsByLCWithOptions(request, runtime);
}

model ListLabelsRequest {
  labelContent?: string(name='LabelContent'),
  labelId?: string(name='LabelId'),
  maxResults?: int32(name='MaxResults'),
  nextToken?: string(name='NextToken'),
}

model ListLabelsResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      content?: string(name='Content'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      id?: long(name='Id'),
      labelId?: string(name='LabelId'),
      tenantId?: string(name='TenantId'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  nextToken?: string(name='NextToken'),
  requestId?: string(name='RequestId'),
}

model ListLabelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListLabelsResponseBody(name='body'),
}

/**
 * @summary 获取标签列表
 *
 * @param request ListLabelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListLabelsResponse
 */
async function listLabelsWithOptions(request: ListLabelsRequest, runtime: Util.RuntimeOptions): ListLabelsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.labelContent)) {
    body['LabelContent'] = request.labelContent;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }
  if (!Util.isUnset(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListLabels',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取标签列表
 *
 * @param request ListLabelsRequest
 * @return ListLabelsResponse
 */
async function listLabels(request: ListLabelsRequest): ListLabelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLabelsWithOptions(request, runtime);
}

model ListTenantDeviceOtaInfoRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  taskId?: int32(name='TaskId', description='This parameter is required.'),
}

model ListTenantDeviceOtaInfoResponseBody = {
  code?: string(name='Code'),
  data?: {
    tenantDeviceOtaInfos?: [ 
      {
        currentVersion?: string(name='CurrentVersion'),
        deviceId?: string(name='DeviceId'),
        model?: string(name='Model'),
      }
    ](name='TenantDeviceOtaInfos'),
  }(name='Data'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListTenantDeviceOtaInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTenantDeviceOtaInfoResponseBody(name='body'),
}

/**
 * @summary 获取租户升级设备信息
 *
 * @param request ListTenantDeviceOtaInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTenantDeviceOtaInfoResponse
 */
async function listTenantDeviceOtaInfoWithOptions(request: ListTenantDeviceOtaInfoRequest, runtime: Util.RuntimeOptions): ListTenantDeviceOtaInfoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListTenantDeviceOtaInfo',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取租户升级设备信息
 *
 * @param request ListTenantDeviceOtaInfoRequest
 * @return ListTenantDeviceOtaInfoResponse
 */
async function listTenantDeviceOtaInfo(request: ListTenantDeviceOtaInfoRequest): ListTenantDeviceOtaInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTenantDeviceOtaInfoWithOptions(request, runtime);
}

model ListTerminalRequest {
  alias?: string(name='Alias'),
  buildId?: string(name='BuildId'),
  clientType?: int32(name='ClientType'),
  inManage?: boolean(name='InManage'),
  ipv4?: string(name='Ipv4'),
  locationInfo?: string(name='LocationInfo'),
  maxResults?: int32(name='MaxResults'),
  model?: string(name='Model'),
  nextToken?: string(name='NextToken'),
  searchKeyword?: string(name='SearchKeyword'),
  serialNumber?: string(name='SerialNumber'),
  terminalGroupId?: string(name='TerminalGroupId'),
  uuid?: string(name='Uuid'),
}

model ListTerminalResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      alias?: string(name='Alias'),
      bindUserCount?: int32(name='BindUserCount'),
      bindUserId?: string(name='BindUserId'),
      buildId?: string(name='BuildId'),
      clientType?: int32(name='ClientType'),
      desktopId?: string(name='DesktopId'),
      inManage?: boolean(name='InManage'),
      ipv4?: string(name='Ipv4'),
      lastLoginUser?: string(name='LastLoginUser', deprecated=true),
      locationInfo?: string(name='LocationInfo'),
      lockSettings?: boolean(name='LockSettings'),
      loginUser?: string(name='LoginUser'),
      model?: string(name='Model'),
      onlineStatus?: boolean(name='OnlineStatus'),
      serialNumber?: string(name='SerialNumber'),
      terminalGroupId?: string(name='TerminalGroupId'),
      uuid?: string(name='Uuid'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  nextToken?: string(name='NextToken'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
}

model ListTerminalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTerminalResponseBody(name='body'),
}

/**
 * @summary 查询终端列表
 *
 * @param request ListTerminalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTerminalResponse
 */
async function listTerminalWithOptions(request: ListTerminalRequest, runtime: Util.RuntimeOptions): ListTerminalResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.alias)) {
    body['Alias'] = request.alias;
  }
  if (!Util.isUnset(request.buildId)) {
    body['BuildId'] = request.buildId;
  }
  if (!Util.isUnset(request.clientType)) {
    body['ClientType'] = request.clientType;
  }
  if (!Util.isUnset(request.inManage)) {
    body['InManage'] = request.inManage;
  }
  if (!Util.isUnset(request.ipv4)) {
    body['Ipv4'] = request.ipv4;
  }
  if (!Util.isUnset(request.locationInfo)) {
    body['LocationInfo'] = request.locationInfo;
  }
  if (!Util.isUnset(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.searchKeyword)) {
    body['SearchKeyword'] = request.searchKeyword;
  }
  if (!Util.isUnset(request.serialNumber)) {
    body['SerialNumber'] = request.serialNumber;
  }
  if (!Util.isUnset(request.terminalGroupId)) {
    body['TerminalGroupId'] = request.terminalGroupId;
  }
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListTerminal',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询终端列表
 *
 * @param request ListTerminalRequest
 * @return ListTerminalResponse
 */
async function listTerminal(request: ListTerminalRequest): ListTerminalResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTerminalWithOptions(request, runtime);
}

model ListTerminalsRequest {
  inManage?: boolean(name='InManage'),
  maxResults?: int32(name='MaxResults', example='200'),
  nextToken?: string(name='NextToken', example='AAAAAdEdsXbwG2ZlbWCzN4wTTg6wQvfp7u1BJl4bxCAby41POSaYAlCvfULQpkAnb0ff****'),
  passwordFreeLoginUser?: string(name='PasswordFreeLoginUser'),
  searchKeyword?: string(name='SearchKeyword', example='DemoDevice'),
  serialNumbers?: [ string ](name='SerialNumbers'),
  terminalGroupId?: string(name='TerminalGroupId', example='tg-default'),
  uuids?: [ string ](name='Uuids'),
  withBindUser?: boolean(name='WithBindUser'),
}

model ListTerminalsResponseBody = {
  code?: string(name='Code', example='TERMINAL_NOT_FOUND'),
  data?: [ 
    {
      alias?: string(name='Alias', example='DemoDevice'),
      bindUserCount?: int32(name='BindUserCount'),
      buildId?: string(name='BuildId', example='7.0.2-RS-20240805.044924'),
      clientType?: int32(name='ClientType', example='1'),
      currentConnectDesktop?: string(name='CurrentConnectDesktop', example='ecd-drqmaogzbmbdf****'),
      currentLoginUser?: string(name='CurrentLoginUser', example='alice'),
      ipv4?: string(name='Ipv4', example='192.168.XX.XX'),
      lastLoginUser?: string(name='LastLoginUser'),
      locationInfo?: string(name='LocationInfo'),
      manageTime?: string(name='ManageTime'),
      model?: string(name='Model', example='US01'),
      online?: boolean(name='Online', example='true'),
      passwordFreeLoginUser?: string(name='PasswordFreeLoginUser', example='alice'),
      publicIpv4?: string(name='PublicIpv4'),
      serialNumber?: string(name='SerialNumber', example='ODN49YQCPQYC****'),
      setPasswordFreeLoginUserTime?: string(name='SetPasswordFreeLoginUserTime'),
      terminalGroupId?: string(name='TerminalGroupId', example='tg-default'),
      uuid?: string(name='Uuid', example='04873D3898B51A7DF2455C1E1DC9****'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='terminal not found'),
  nextToken?: string(name='NextToken', example='AAAAAdEdsXbwG2ZlbWCzN4wTTg6wQvfp7u1BJl4bxCAby41POSaYAlCvfULQpkAnb0ff****'),
  requestId?: string(name='RequestId', example='C5DCE54A-B266-522E-A6ED-468AF45F5AAA'),
  success?: boolean(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='20'),
}

model ListTerminalsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTerminalsResponseBody(name='body'),
}

/**
 * @summary 批量查询终端基本信息
 *
 * @param request ListTerminalsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTerminalsResponse
 */
async function listTerminalsWithOptions(request: ListTerminalsRequest, runtime: Util.RuntimeOptions): ListTerminalsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.inManage)) {
    body['InManage'] = request.inManage;
  }
  if (!Util.isUnset(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.passwordFreeLoginUser)) {
    body['PasswordFreeLoginUser'] = request.passwordFreeLoginUser;
  }
  if (!Util.isUnset(request.searchKeyword)) {
    body['SearchKeyword'] = request.searchKeyword;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.serialNumbers)) {
    bodyFlat['SerialNumbers'] = request.serialNumbers;
  }
  if (!Util.isUnset(request.terminalGroupId)) {
    body['TerminalGroupId'] = request.terminalGroupId;
  }
  if (!Util.isUnset(request.uuids)) {
    bodyFlat['Uuids'] = request.uuids;
  }
  if (!Util.isUnset(request.withBindUser)) {
    body['WithBindUser'] = request.withBindUser;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListTerminals',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询终端基本信息
 *
 * @param request ListTerminalsRequest
 * @return ListTerminalsResponse
 */
async function listTerminals(request: ListTerminalsRequest): ListTerminalsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTerminalsWithOptions(request, runtime);
}

model ListTrustDevicesRequest {
  labelContent?: string(name='LabelContent'),
  labelId?: string(name='LabelId'),
  serialNo?: string(name='SerialNo'),
  userCustomId?: string(name='UserCustomId'),
}

model ListTrustDevicesResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      model?: string(name='Model'),
      serialNo?: string(name='SerialNo'),
      tenantId?: string(name='TenantId'),
      uuid?: string(name='Uuid'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListTrustDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTrustDevicesResponseBody(name='body'),
}

/**
 * @summary 查询可信设备列表
 *
 * @param request ListTrustDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTrustDevicesResponse
 */
async function listTrustDevicesWithOptions(request: ListTrustDevicesRequest, runtime: Util.RuntimeOptions): ListTrustDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.labelContent)) {
    body['LabelContent'] = request.labelContent;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.userCustomId)) {
    body['UserCustomId'] = request.userCustomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListTrustDevices',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询可信设备列表
 *
 * @param request ListTrustDevicesRequest
 * @return ListTrustDevicesResponse
 */
async function listTrustDevices(request: ListTrustDevicesRequest): ListTrustDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTrustDevicesWithOptions(request, runtime);
}

model ListUserFbAcIssuesRequest {
  account?: string(name='Account'),
  clientVersion?: string(name='ClientVersion'),
  errorMessage?: string(name='ErrorMessage'),
  instanceId?: string(name='InstanceId'),
  issueId?: string(name='IssueId'),
  label?: string(name='Label'),
  reservedA?: string(name='ReservedA'),
  reservedB?: string(name='ReservedB'),
  userEmail?: string(name='UserEmail'),
}

model ListUserFbAcIssuesResponseBody = {
  code?: string(name='Code'),
  data?: {
    issueDataList?: [ 
      {
        account?: string(name='Account'),
        clientVersion?: string(name='ClientVersion'),
        errorMessage?: string(name='ErrorMessage'),
        fileList?: [ 
          {
            fileName?: string(name='FileName'),
            fileSize?: int32(name='FileSize'),
            fileType?: int32(name='FileType'),
            sessionId?: string(name='SessionId'),
          }
        ](name='FileList'),
        gmtCreated?: string(name='GmtCreated'),
        gmtModified?: string(name='GmtModified'),
        instanceId?: string(name='InstanceId'),
        issueId?: long(name='IssueId'),
        label?: string(name='Label'),
        reservedA?: string(name='ReservedA'),
        reservedB?: string(name='ReservedB'),
        userEmail?: string(name='UserEmail'),
      }
    ](name='IssueDataList'),
    totalCount?: long(name='TotalCount'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListUserFbAcIssuesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserFbAcIssuesResponseBody(name='body'),
}

/**
 * @summary 查询问题反馈列表
 *
 * @param request ListUserFbAcIssuesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserFbAcIssuesResponse
 */
async function listUserFbAcIssuesWithOptions(request: ListUserFbAcIssuesRequest, runtime: Util.RuntimeOptions): ListUserFbAcIssuesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.account)) {
    body['Account'] = request.account;
  }
  if (!Util.isUnset(request.clientVersion)) {
    body['ClientVersion'] = request.clientVersion;
  }
  if (!Util.isUnset(request.errorMessage)) {
    body['ErrorMessage'] = request.errorMessage;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.issueId)) {
    body['IssueId'] = request.issueId;
  }
  if (!Util.isUnset(request.label)) {
    body['Label'] = request.label;
  }
  if (!Util.isUnset(request.reservedA)) {
    body['ReservedA'] = request.reservedA;
  }
  if (!Util.isUnset(request.reservedB)) {
    body['ReservedB'] = request.reservedB;
  }
  if (!Util.isUnset(request.userEmail)) {
    body['UserEmail'] = request.userEmail;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListUserFbAcIssues',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询问题反馈列表
 *
 * @param request ListUserFbAcIssuesRequest
 * @return ListUserFbAcIssuesResponse
 */
async function listUserFbAcIssues(request: ListUserFbAcIssuesRequest): ListUserFbAcIssuesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserFbAcIssuesWithOptions(request, runtime);
}

model ListUserFbIssuesRequest {
  appId?: string(name='AppId'),
  clientId?: string(name='ClientId'),
  clientModel?: string(name='ClientModel'),
  clientSn?: string(name='ClientSn'),
  customerId?: string(name='CustomerId'),
  description?: string(name='Description'),
  desktopId?: string(name='DesktopId'),
  errorCode?: string(name='ErrorCode'),
  errorMsg?: string(name='ErrorMsg'),
  fbType?: int32(name='FbType'),
  issueId?: int32(name='IssueId'),
  issueLabel?: string(name='IssueLabel'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  status?: int32(name='Status'),
  title?: string(name='Title'),
  userEmail?: string(name='UserEmail'),
  userId?: string(name='UserId'),
  wasRead?: int32(name='WasRead'),
}

model ListUserFbIssuesResponseBody = {
  code?: string(name='Code'),
  data?: {
    count?: string(name='Count'),
    feedbackIssueData?: [ 
      {
        appId?: string(name='AppId'),
        clientId?: string(name='ClientId'),
        clientModel?: string(name='ClientModel'),
        clientSn?: string(name='ClientSn'),
        customerId?: string(name='CustomerId'),
        description?: string(name='Description'),
        desktopId?: string(name='DesktopId'),
        errorCode?: string(name='ErrorCode'),
        errorMsg?: string(name='ErrorMsg'),
        fbType?: int32(name='FbType'),
        fileList?: [ 
          {
            fileMd5?: string(name='FileMd5'),
            fileName?: string(name='FileName'),
            fileSize?: int32(name='FileSize'),
            fileType?: int32(name='FileType'),
            ossUrl?: string(name='OssUrl'),
          }
        ](name='FileList'),
        gmtCreated?: string(name='GmtCreated'),
        issueId?: int32(name='IssueId'),
        issueLabel?: string(name='IssueLabel'),
        status?: int32(name='Status'),
        title?: string(name='Title'),
        userEmail?: string(name='UserEmail'),
        userId?: string(name='UserId'),
      }
    ](name='FeedbackIssueData'),
  }(name='Data'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListUserFbIssuesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserFbIssuesResponseBody(name='body'),
}

/**
 * @summary 查询用户反馈问题列表
 *
 * @param request ListUserFbIssuesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserFbIssuesResponse
 */
async function listUserFbIssuesWithOptions(request: ListUserFbIssuesRequest, runtime: Util.RuntimeOptions): ListUserFbIssuesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clientId)) {
    body['ClientId'] = request.clientId;
  }
  if (!Util.isUnset(request.clientModel)) {
    body['ClientModel'] = request.clientModel;
  }
  if (!Util.isUnset(request.clientSn)) {
    body['ClientSn'] = request.clientSn;
  }
  if (!Util.isUnset(request.customerId)) {
    body['CustomerId'] = request.customerId;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.desktopId)) {
    body['DesktopId'] = request.desktopId;
  }
  if (!Util.isUnset(request.errorCode)) {
    body['ErrorCode'] = request.errorCode;
  }
  if (!Util.isUnset(request.errorMsg)) {
    body['ErrorMsg'] = request.errorMsg;
  }
  if (!Util.isUnset(request.fbType)) {
    body['FbType'] = request.fbType;
  }
  if (!Util.isUnset(request.issueId)) {
    body['IssueId'] = request.issueId;
  }
  if (!Util.isUnset(request.issueLabel)) {
    body['IssueLabel'] = request.issueLabel;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  if (!Util.isUnset(request.userEmail)) {
    body['UserEmail'] = request.userEmail;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.wasRead)) {
    body['WasRead'] = request.wasRead;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListUserFbIssues',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户反馈问题列表
 *
 * @param request ListUserFbIssuesRequest
 * @return ListUserFbIssuesResponse
 */
async function listUserFbIssues(request: ListUserFbIssuesRequest): ListUserFbIssuesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserFbIssuesWithOptions(request, runtime);
}

model ModifyDevicesSecureNetworkTypeRequest {
  allDevices?: long(name='AllDevices'),
  secureNetworkType?: string(name='SecureNetworkType', description='This parameter is required.'),
  serialNos?: string(name='SerialNos'),
}

model ModifyDevicesSecureNetworkTypeResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ModifyDevicesSecureNetworkTypeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDevicesSecureNetworkTypeResponseBody(name='body'),
}

/**
 * @summary 修改设备安全入网类型
 *
 * @param request ModifyDevicesSecureNetworkTypeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDevicesSecureNetworkTypeResponse
 */
async function modifyDevicesSecureNetworkTypeWithOptions(request: ModifyDevicesSecureNetworkTypeRequest, runtime: Util.RuntimeOptions): ModifyDevicesSecureNetworkTypeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.allDevices)) {
    body['AllDevices'] = request.allDevices;
  }
  if (!Util.isUnset(request.secureNetworkType)) {
    body['SecureNetworkType'] = request.secureNetworkType;
  }
  if (!Util.isUnset(request.serialNos)) {
    body['SerialNos'] = request.serialNos;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyDevicesSecureNetworkType',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改设备安全入网类型
 *
 * @param request ModifyDevicesSecureNetworkTypeRequest
 * @return ModifyDevicesSecureNetworkTypeResponse
 */
async function modifyDevicesSecureNetworkType(request: ModifyDevicesSecureNetworkTypeRequest): ModifyDevicesSecureNetworkTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDevicesSecureNetworkTypeWithOptions(request, runtime);
}

model ModifySecureNetworkTypeRequest {
  secureNetworkType?: string(name='SecureNetworkType'),
  serialNo?: string(name='SerialNo', description='This parameter is required.'),
}

model ModifySecureNetworkTypeResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ModifySecureNetworkTypeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifySecureNetworkTypeResponseBody(name='body'),
}

/**
 * @summary 匿名api修改安全入网配置
 *
 * @param request ModifySecureNetworkTypeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifySecureNetworkTypeResponse
 */
async function modifySecureNetworkTypeWithOptions(request: ModifySecureNetworkTypeRequest, runtime: Util.RuntimeOptions): ModifySecureNetworkTypeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.secureNetworkType)) {
    body['SecureNetworkType'] = request.secureNetworkType;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifySecureNetworkType',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 匿名api修改安全入网配置
 *
 * @param request ModifySecureNetworkTypeRequest
 * @return ModifySecureNetworkTypeResponse
 */
async function modifySecureNetworkType(request: ModifySecureNetworkTypeRequest): ModifySecureNetworkTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifySecureNetworkTypeWithOptions(request, runtime);
}

model RegisterDeviceRequest {
  bluetooth?: string(name='Bluetooth'),
  buildId?: string(name='BuildId'),
  chipId?: string(name='ChipId'),
  clientId?: string(name='ClientId'),
  clientType?: int32(name='ClientType'),
  cpu?: string(name='Cpu'),
  customId?: string(name='CustomId'),
  etherMac?: string(name='EtherMac'),
  memory?: string(name='Memory'),
  model?: string(name='Model'),
  serialNo?: string(name='SerialNo'),
  storage?: string(name='Storage'),
  token?: string(name='Token'),
  wlan?: string(name='Wlan'),
}

model RegisterDeviceResponseBody = {
  code?: string(name='Code'),
  data?: {
    uuid?: string(name='Uuid'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model RegisterDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RegisterDeviceResponseBody(name='body'),
}

/**
 * @summary 设备注册
 *
 * @param request RegisterDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RegisterDeviceResponse
 */
async function registerDeviceWithOptions(request: RegisterDeviceRequest, runtime: Util.RuntimeOptions): RegisterDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bluetooth)) {
    body['Bluetooth'] = request.bluetooth;
  }
  if (!Util.isUnset(request.buildId)) {
    body['BuildId'] = request.buildId;
  }
  if (!Util.isUnset(request.chipId)) {
    body['ChipId'] = request.chipId;
  }
  if (!Util.isUnset(request.clientId)) {
    body['ClientId'] = request.clientId;
  }
  if (!Util.isUnset(request.clientType)) {
    body['ClientType'] = request.clientType;
  }
  if (!Util.isUnset(request.cpu)) {
    body['Cpu'] = request.cpu;
  }
  if (!Util.isUnset(request.customId)) {
    body['CustomId'] = request.customId;
  }
  if (!Util.isUnset(request.etherMac)) {
    body['EtherMac'] = request.etherMac;
  }
  if (!Util.isUnset(request.memory)) {
    body['Memory'] = request.memory;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.storage)) {
    body['Storage'] = request.storage;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.wlan)) {
    body['Wlan'] = request.wlan;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RegisterDevice',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 设备注册
 *
 * @param request RegisterDeviceRequest
 * @return RegisterDeviceResponse
 */
async function registerDevice(request: RegisterDeviceRequest): RegisterDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerDeviceWithOptions(request, runtime);
}

model ReportAppOtaInfoRequest {
  baseVersion?: string(name='BaseVersion'),
  clientType?: int32(name='ClientType'),
  clientUid?: string(name='ClientUid'),
  note?: string(name='Note'),
  osType?: string(name='OsType'),
  project?: string(name='Project'),
  status?: int32(name='Status'),
  targetVersion?: string(name='TargetVersion'),
  taskUid?: string(name='TaskUid'),
}

model ReportAppOtaInfoResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ReportAppOtaInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReportAppOtaInfoResponseBody(name='body'),
}

/**
 * @summary 上报升级信息
 *
 * @param request ReportAppOtaInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReportAppOtaInfoResponse
 */
async function reportAppOtaInfoWithOptions(request: ReportAppOtaInfoRequest, runtime: Util.RuntimeOptions): ReportAppOtaInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.baseVersion)) {
    query['BaseVersion'] = request.baseVersion;
  }
  if (!Util.isUnset(request.clientType)) {
    query['ClientType'] = request.clientType;
  }
  if (!Util.isUnset(request.clientUid)) {
    query['ClientUid'] = request.clientUid;
  }
  if (!Util.isUnset(request.note)) {
    query['Note'] = request.note;
  }
  if (!Util.isUnset(request.osType)) {
    query['OsType'] = request.osType;
  }
  if (!Util.isUnset(request.project)) {
    query['Project'] = request.project;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.targetVersion)) {
    query['TargetVersion'] = request.targetVersion;
  }
  if (!Util.isUnset(request.taskUid)) {
    query['TaskUid'] = request.taskUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReportAppOtaInfo',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 上报升级信息
 *
 * @param request ReportAppOtaInfoRequest
 * @return ReportAppOtaInfoResponse
 */
async function reportAppOtaInfo(request: ReportAppOtaInfoRequest): ReportAppOtaInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return reportAppOtaInfoWithOptions(request, runtime);
}

model ReportDeviceOtaInfoRequest {
  baseVersion?: string(name='BaseVersion'),
  deviceId?: string(name='DeviceId'),
  model?: string(name='Model'),
  note?: string(name='Note'),
  status?: int32(name='Status'),
  targetVersion?: string(name='TargetVersion'),
}

model ReportDeviceOtaInfoResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ReportDeviceOtaInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReportDeviceOtaInfoResponseBody(name='body'),
}

/**
 * @summary 升级信息上报
 *
 * @param request ReportDeviceOtaInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReportDeviceOtaInfoResponse
 */
async function reportDeviceOtaInfoWithOptions(request: ReportDeviceOtaInfoRequest, runtime: Util.RuntimeOptions): ReportDeviceOtaInfoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.baseVersion)) {
    body['BaseVersion'] = request.baseVersion;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.note)) {
    body['Note'] = request.note;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.targetVersion)) {
    body['TargetVersion'] = request.targetVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ReportDeviceOtaInfo',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 升级信息上报
 *
 * @param request ReportDeviceOtaInfoRequest
 * @return ReportDeviceOtaInfoResponse
 */
async function reportDeviceOtaInfo(request: ReportDeviceOtaInfoRequest): ReportDeviceOtaInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return reportDeviceOtaInfoWithOptions(request, runtime);
}

model ReportUserFbAcIssueRequest {
  account?: string(name='Account'),
  clientVersion?: string(name='ClientVersion'),
  errorMsg?: string(name='ErrorMsg'),
  fileList?: [ 
    {
      fileName?: string(name='FileName', description='This parameter is required.'),
      fileSize?: int32(name='FileSize'),
      fileType?: int32(name='FileType'),
      sessionId?: string(name='SessionId', description='This parameter is required.'),
    }
  ](name='FileList'),
  instanceId?: string(name='InstanceId'),
  labels?: string(name='Labels'),
  reservedA?: string(name='ReservedA'),
  reservedB?: string(name='ReservedB'),
  userEmail?: string(name='UserEmail'),
}

model ReportUserFbAcIssueShrinkRequest {
  account?: string(name='Account'),
  clientVersion?: string(name='ClientVersion'),
  errorMsg?: string(name='ErrorMsg'),
  fileListShrink?: string(name='FileList'),
  instanceId?: string(name='InstanceId'),
  labels?: string(name='Labels'),
  reservedA?: string(name='ReservedA'),
  reservedB?: string(name='ReservedB'),
  userEmail?: string(name='UserEmail'),
}

model ReportUserFbAcIssueResponseBody = {
  code?: string(name='Code'),
  data?: {
    issueId?: long(name='IssueId'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ReportUserFbAcIssueResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReportUserFbAcIssueResponseBody(name='body'),
}

/**
 * @summary 应用中心用户问题反馈
 *
 * @param tmpReq ReportUserFbAcIssueRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReportUserFbAcIssueResponse
 */
async function reportUserFbAcIssueWithOptions(tmpReq: ReportUserFbAcIssueRequest, runtime: Util.RuntimeOptions): ReportUserFbAcIssueResponse {
  Util.validateModel(tmpReq);
  var request = new ReportUserFbAcIssueShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.fileList)) {
    request.fileListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.fileList, 'FileList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.account)) {
    body['Account'] = request.account;
  }
  if (!Util.isUnset(request.clientVersion)) {
    body['ClientVersion'] = request.clientVersion;
  }
  if (!Util.isUnset(request.errorMsg)) {
    body['ErrorMsg'] = request.errorMsg;
  }
  if (!Util.isUnset(request.fileListShrink)) {
    body['FileList'] = request.fileListShrink;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.labels)) {
    body['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.reservedA)) {
    body['ReservedA'] = request.reservedA;
  }
  if (!Util.isUnset(request.reservedB)) {
    body['ReservedB'] = request.reservedB;
  }
  if (!Util.isUnset(request.userEmail)) {
    body['UserEmail'] = request.userEmail;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ReportUserFbAcIssue',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 应用中心用户问题反馈
 *
 * @param request ReportUserFbAcIssueRequest
 * @return ReportUserFbAcIssueResponse
 */
async function reportUserFbAcIssue(request: ReportUserFbAcIssueRequest): ReportUserFbAcIssueResponse {
  var runtime = new Util.RuntimeOptions{};
  return reportUserFbAcIssueWithOptions(request, runtime);
}

model ReportUserFbIssueRequest {
  appId?: string(name='AppId'),
  clientId?: string(name='ClientId'),
  clientModel?: string(name='ClientModel'),
  clientOsName?: string(name='ClientOsName'),
  clientSn?: string(name='ClientSn'),
  clientVersion?: string(name='ClientVersion'),
  customerId?: string(name='CustomerId'),
  description?: string(name='Description'),
  desktopId?: string(name='DesktopId'),
  desktopType?: int32(name='DesktopType'),
  errorCode?: string(name='ErrorCode'),
  errorMsg?: string(name='ErrorMsg'),
  fbType?: int32(name='FbType'),
  fileList?: [ 
    {
      fileMd5?: string(name='FileMd5'),
      fileName?: string(name='FileName', description='This parameter is required.'),
      fileSize?: int32(name='FileSize'),
      fileType?: int32(name='FileType'),
      ossUrl?: string(name='OssUrl'),
      sessionId?: string(name='SessionId'),
    }
  ](name='FileList'),
  issueLabel?: string(name='IssueLabel'),
  occurTime?: long(name='OccurTime'),
  reservedA?: string(name='ReservedA'),
  reservedB?: string(name='ReservedB'),
  telNo?: string(name='TelNo'),
  title?: string(name='Title'),
  userEmail?: string(name='UserEmail'),
  userId?: string(name='UserId'),
  userName?: string(name='UserName'),
  workspaceId?: string(name='WorkspaceId'),
  wyId?: string(name='WyId'),
}

model ReportUserFbIssueShrinkRequest {
  appId?: string(name='AppId'),
  clientId?: string(name='ClientId'),
  clientModel?: string(name='ClientModel'),
  clientOsName?: string(name='ClientOsName'),
  clientSn?: string(name='ClientSn'),
  clientVersion?: string(name='ClientVersion'),
  customerId?: string(name='CustomerId'),
  description?: string(name='Description'),
  desktopId?: string(name='DesktopId'),
  desktopType?: int32(name='DesktopType'),
  errorCode?: string(name='ErrorCode'),
  errorMsg?: string(name='ErrorMsg'),
  fbType?: int32(name='FbType'),
  fileListShrink?: string(name='FileList'),
  issueLabel?: string(name='IssueLabel'),
  occurTime?: long(name='OccurTime'),
  reservedA?: string(name='ReservedA'),
  reservedB?: string(name='ReservedB'),
  telNo?: string(name='TelNo'),
  title?: string(name='Title'),
  userEmail?: string(name='UserEmail'),
  userId?: string(name='UserId'),
  userName?: string(name='UserName'),
  workspaceId?: string(name='WorkspaceId'),
  wyId?: string(name='WyId'),
}

model ReportUserFbIssueResponseBody = {
  code?: string(name='Code'),
  data?: {
    issueId?: int32(name='IssueId'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ReportUserFbIssueResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReportUserFbIssueResponseBody(name='body'),
}

/**
 * @summary 上报用户反馈问题
 *
 * @param tmpReq ReportUserFbIssueRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReportUserFbIssueResponse
 */
async function reportUserFbIssueWithOptions(tmpReq: ReportUserFbIssueRequest, runtime: Util.RuntimeOptions): ReportUserFbIssueResponse {
  Util.validateModel(tmpReq);
  var request = new ReportUserFbIssueShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.fileList)) {
    request.fileListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.fileList, 'FileList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clientId)) {
    body['ClientId'] = request.clientId;
  }
  if (!Util.isUnset(request.clientModel)) {
    body['ClientModel'] = request.clientModel;
  }
  if (!Util.isUnset(request.clientOsName)) {
    body['ClientOsName'] = request.clientOsName;
  }
  if (!Util.isUnset(request.clientSn)) {
    body['ClientSn'] = request.clientSn;
  }
  if (!Util.isUnset(request.clientVersion)) {
    body['ClientVersion'] = request.clientVersion;
  }
  if (!Util.isUnset(request.customerId)) {
    body['CustomerId'] = request.customerId;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.desktopId)) {
    body['DesktopId'] = request.desktopId;
  }
  if (!Util.isUnset(request.desktopType)) {
    body['DesktopType'] = request.desktopType;
  }
  if (!Util.isUnset(request.errorCode)) {
    body['ErrorCode'] = request.errorCode;
  }
  if (!Util.isUnset(request.errorMsg)) {
    body['ErrorMsg'] = request.errorMsg;
  }
  if (!Util.isUnset(request.fbType)) {
    body['FbType'] = request.fbType;
  }
  if (!Util.isUnset(request.fileListShrink)) {
    body['FileList'] = request.fileListShrink;
  }
  if (!Util.isUnset(request.issueLabel)) {
    body['IssueLabel'] = request.issueLabel;
  }
  if (!Util.isUnset(request.occurTime)) {
    body['OccurTime'] = request.occurTime;
  }
  if (!Util.isUnset(request.reservedA)) {
    body['ReservedA'] = request.reservedA;
  }
  if (!Util.isUnset(request.reservedB)) {
    body['ReservedB'] = request.reservedB;
  }
  if (!Util.isUnset(request.telNo)) {
    body['TelNo'] = request.telNo;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  if (!Util.isUnset(request.userEmail)) {
    body['UserEmail'] = request.userEmail;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.userName)) {
    body['UserName'] = request.userName;
  }
  if (!Util.isUnset(request.workspaceId)) {
    body['WorkspaceId'] = request.workspaceId;
  }
  if (!Util.isUnset(request.wyId)) {
    body['WyId'] = request.wyId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ReportUserFbIssue',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'Anonymous',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 上报用户反馈问题
 *
 * @param request ReportUserFbIssueRequest
 * @return ReportUserFbIssueResponse
 */
async function reportUserFbIssue(request: ReportUserFbIssueRequest): ReportUserFbIssueResponse {
  var runtime = new Util.RuntimeOptions{};
  return reportUserFbIssueWithOptions(request, runtime);
}

model SendOpsMessageToTerminalsRequest {
  delay?: boolean(name='Delay'),
  msg?: string(name='Msg'),
  opsAction?: string(name='OpsAction'),
  uuids?: [ string ](name='Uuids'),
  waitForAck?: boolean(name='WaitForAck'),
}

model SendOpsMessageToTerminalsResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model SendOpsMessageToTerminalsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SendOpsMessageToTerminalsResponseBody(name='body'),
}

/**
 * @summary 向终端发送运维命令
 *
 * @param request SendOpsMessageToTerminalsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SendOpsMessageToTerminalsResponse
 */
async function sendOpsMessageToTerminalsWithOptions(request: SendOpsMessageToTerminalsRequest, runtime: Util.RuntimeOptions): SendOpsMessageToTerminalsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.delay)) {
    query['Delay'] = request.delay;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.msg)) {
    body['Msg'] = request.msg;
  }
  if (!Util.isUnset(request.opsAction)) {
    body['OpsAction'] = request.opsAction;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.uuids)) {
    bodyFlat['Uuids'] = request.uuids;
  }
  if (!Util.isUnset(request.waitForAck)) {
    body['WaitForAck'] = request.waitForAck;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SendOpsMessageToTerminals',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 向终端发送运维命令
 *
 * @param request SendOpsMessageToTerminalsRequest
 * @return SendOpsMessageToTerminalsResponse
 */
async function sendOpsMessageToTerminals(request: SendOpsMessageToTerminalsRequest): SendOpsMessageToTerminalsResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendOpsMessageToTerminalsWithOptions(request, runtime);
}

model SetDeviceOtaAutoStatusRequest {
  autoUpdate?: int32(name='AutoUpdate'),
  autoUpdateTimeSchedule?: string(name='AutoUpdateTimeSchedule'),
  clientType?: int32(name='ClientType'),
  forceUpgrade?: int32(name='ForceUpgrade'),
  status?: string(name='Status'),
}

model SetDeviceOtaAutoStatusResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model SetDeviceOtaAutoStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDeviceOtaAutoStatusResponseBody(name='body'),
}

/**
 * @summary 设置租户ota自动开启/关闭
 *
 * @param request SetDeviceOtaAutoStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDeviceOtaAutoStatusResponse
 */
async function setDeviceOtaAutoStatusWithOptions(request: SetDeviceOtaAutoStatusRequest, runtime: Util.RuntimeOptions): SetDeviceOtaAutoStatusResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.autoUpdate)) {
    body['AutoUpdate'] = request.autoUpdate;
  }
  if (!Util.isUnset(request.autoUpdateTimeSchedule)) {
    body['AutoUpdateTimeSchedule'] = request.autoUpdateTimeSchedule;
  }
  if (!Util.isUnset(request.clientType)) {
    body['ClientType'] = request.clientType;
  }
  if (!Util.isUnset(request.forceUpgrade)) {
    body['ForceUpgrade'] = request.forceUpgrade;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SetDeviceOtaAutoStatus',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 设置租户ota自动开启/关闭
 *
 * @param request SetDeviceOtaAutoStatusRequest
 * @return SetDeviceOtaAutoStatusResponse
 */
async function setDeviceOtaAutoStatus(request: SetDeviceOtaAutoStatusRequest): SetDeviceOtaAutoStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDeviceOtaAutoStatusWithOptions(request, runtime);
}

model SetDeviceOtaTaskStatusRequest {
  operationStatus?: int32(name='OperationStatus', description='This parameter is required.'),
  taskId?: int32(name='TaskId', description='This parameter is required.'),
}

model SetDeviceOtaTaskStatusResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model SetDeviceOtaTaskStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDeviceOtaTaskStatusResponseBody(name='body'),
}

/**
 * @summary 租户设置设备ota任务的状态
 *
 * @param request SetDeviceOtaTaskStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDeviceOtaTaskStatusResponse
 */
async function setDeviceOtaTaskStatusWithOptions(request: SetDeviceOtaTaskStatusRequest, runtime: Util.RuntimeOptions): SetDeviceOtaTaskStatusResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.operationStatus)) {
    body['OperationStatus'] = request.operationStatus;
  }
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SetDeviceOtaTaskStatus',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 租户设置设备ota任务的状态
 *
 * @param request SetDeviceOtaTaskStatusRequest
 * @return SetDeviceOtaTaskStatusResponse
 */
async function setDeviceOtaTaskStatus(request: SetDeviceOtaTaskStatusRequest): SetDeviceOtaTaskStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDeviceOtaTaskStatusWithOptions(request, runtime);
}

model UnbindAccountLessLoginUserRequest {
  serialNumber?: string(name='SerialNumber'),
  uuid?: string(name='Uuid'),
}

model UnbindAccountLessLoginUserResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UnbindAccountLessLoginUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindAccountLessLoginUserResponseBody(name='body'),
}

/**
 * @summary 解绑免账号登录用户
 *
 * @param request UnbindAccountLessLoginUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindAccountLessLoginUserResponse
 */
async function unbindAccountLessLoginUserWithOptions(request: UnbindAccountLessLoginUserRequest, runtime: Util.RuntimeOptions): UnbindAccountLessLoginUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serialNumber)) {
    body['SerialNumber'] = request.serialNumber;
  }
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindAccountLessLoginUser',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 解绑免账号登录用户
 *
 * @param request UnbindAccountLessLoginUserRequest
 * @return UnbindAccountLessLoginUserResponse
 */
async function unbindAccountLessLoginUser(request: UnbindAccountLessLoginUserRequest): UnbindAccountLessLoginUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindAccountLessLoginUserWithOptions(request, runtime);
}

model UnbindDeviceSeatsRequest {
  serialNoList?: [ string ](name='SerialNoList'),
}

model UnbindDeviceSeatsShrinkRequest {
  serialNoListShrink?: string(name='SerialNoList'),
}

model UnbindDeviceSeatsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UnbindDeviceSeatsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindDeviceSeatsResponseBody(name='body'),
}

/**
 * @summary 解绑设备座位
 *
 * @param tmpReq UnbindDeviceSeatsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindDeviceSeatsResponse
 */
async function unbindDeviceSeatsWithOptions(tmpReq: UnbindDeviceSeatsRequest, runtime: Util.RuntimeOptions): UnbindDeviceSeatsResponse {
  Util.validateModel(tmpReq);
  var request = new UnbindDeviceSeatsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.serialNoList)) {
    request.serialNoListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.serialNoList, 'SerialNoList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.serialNoListShrink)) {
    body['SerialNoList'] = request.serialNoListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindDeviceSeats',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 解绑设备座位
 *
 * @param request UnbindDeviceSeatsRequest
 * @return UnbindDeviceSeatsResponse
 */
async function unbindDeviceSeats(request: UnbindDeviceSeatsRequest): UnbindDeviceSeatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindDeviceSeatsWithOptions(request, runtime);
}

model UnbindPasswordFreeLoginUserRequest {
  serialNumber?: string(name='SerialNumber'),
  uuid?: string(name='Uuid'),
}

model UnbindPasswordFreeLoginUserResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UnbindPasswordFreeLoginUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindPasswordFreeLoginUserResponseBody(name='body'),
}

/**
 * @summary 解绑免密登录用户
 *
 * @param request UnbindPasswordFreeLoginUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindPasswordFreeLoginUserResponse
 */
async function unbindPasswordFreeLoginUserWithOptions(request: UnbindPasswordFreeLoginUserRequest, runtime: Util.RuntimeOptions): UnbindPasswordFreeLoginUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serialNumber)) {
    body['SerialNumber'] = request.serialNumber;
  }
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindPasswordFreeLoginUser',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 解绑免密登录用户
 *
 * @param request UnbindPasswordFreeLoginUserRequest
 * @return UnbindPasswordFreeLoginUserResponse
 */
async function unbindPasswordFreeLoginUser(request: UnbindPasswordFreeLoginUserRequest): UnbindPasswordFreeLoginUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindPasswordFreeLoginUserWithOptions(request, runtime);
}

model UpdateAliasRequest {
  alias?: string(name='Alias'),
  serialNo?: string(name='SerialNo'),
  uuid?: string(name='Uuid'),
}

model UpdateAliasResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UpdateAliasResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAliasResponseBody(name='body'),
}

/**
 * @summary 更新设备别名
 *
 * @param request UpdateAliasRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAliasResponse
 */
async function updateAliasWithOptions(request: UpdateAliasRequest, runtime: Util.RuntimeOptions): UpdateAliasResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.alias)) {
    body['Alias'] = request.alias;
  }
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAlias',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新设备别名
 *
 * @param request UpdateAliasRequest
 * @return UpdateAliasResponse
 */
async function updateAlias(request: UpdateAliasRequest): UpdateAliasResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAliasWithOptions(request, runtime);
}

model UpdateDeviceBindedEndUserRequest {
  serialNo?: string(name='SerialNo', description='This parameter is required.'),
  sourceAdEndUsers?: [ 
    {
      adDomain?: string(name='AdDomain'),
      directoryId?: string(name='DirectoryId'),
      endUserId?: string(name='EndUserId'),
    }
  ](name='SourceAdEndUsers'),
  sourceEndUserIds?: string(name='SourceEndUserIds'),
  targetAdEndUsers?: [ 
    {
      adDomain?: string(name='AdDomain'),
      directoryId?: string(name='DirectoryId'),
      endUserId?: string(name='EndUserId'),
    }
  ](name='TargetAdEndUsers'),
  targetEndUserIds?: string(name='TargetEndUserIds'),
  userType?: string(name='UserType'),
}

model UpdateDeviceBindedEndUserResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UpdateDeviceBindedEndUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateDeviceBindedEndUserResponseBody(name='body'),
}

/**
 * @summary 批量更新设备绑定的终端用户
 *
 * @param request UpdateDeviceBindedEndUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateDeviceBindedEndUserResponse
 */
async function updateDeviceBindedEndUserWithOptions(request: UpdateDeviceBindedEndUserRequest, runtime: Util.RuntimeOptions): UpdateDeviceBindedEndUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serialNo)) {
    body['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.sourceAdEndUsers)) {
    body['SourceAdEndUsers'] = request.sourceAdEndUsers;
  }
  if (!Util.isUnset(request.sourceEndUserIds)) {
    body['SourceEndUserIds'] = request.sourceEndUserIds;
  }
  if (!Util.isUnset(request.targetAdEndUsers)) {
    body['TargetAdEndUsers'] = request.targetAdEndUsers;
  }
  if (!Util.isUnset(request.targetEndUserIds)) {
    body['TargetEndUserIds'] = request.targetEndUserIds;
  }
  if (!Util.isUnset(request.userType)) {
    body['UserType'] = request.userType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDeviceBindedEndUser',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量更新设备绑定的终端用户
 *
 * @param request UpdateDeviceBindedEndUserRequest
 * @return UpdateDeviceBindedEndUserResponse
 */
async function updateDeviceBindedEndUser(request: UpdateDeviceBindedEndUserRequest): UpdateDeviceBindedEndUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeviceBindedEndUserWithOptions(request, runtime);
}

model UpdateLabelRequest {
  labelContent?: string(name='LabelContent'),
  labelId?: string(name='LabelId'),
}

model UpdateLabelResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UpdateLabelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateLabelResponseBody(name='body'),
}

/**
 * @summary 修改标签
 *
 * @param request UpdateLabelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateLabelResponse
 */
async function updateLabelWithOptions(request: UpdateLabelRequest, runtime: Util.RuntimeOptions): UpdateLabelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.labelContent)) {
    body['LabelContent'] = request.labelContent;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLabel',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改标签
 *
 * @param request UpdateLabelRequest
 * @return UpdateLabelResponse
 */
async function updateLabel(request: UpdateLabelRequest): UpdateLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLabelWithOptions(request, runtime);
}

model UpdateTerminalPolicyRequest {
  backgroundModeTitle?: string(name='BackgroundModeTitle'),
  displayLayout?: string(name='DisplayLayout'),
  displayResolution?: string(name='DisplayResolution'),
  displayScaleRatio?: string(name='DisplayScaleRatio'),
  enableAutoLockScreen?: int32(name='EnableAutoLockScreen'),
  enableAutoLogin?: int32(name='EnableAutoLogin'),
  enableBackgroundMode?: int32(name='EnableBackgroundMode'),
  enableBluetooth?: int32(name='EnableBluetooth'),
  enableModifyPassword?: int32(name='EnableModifyPassword'),
  enableScheduledReboot?: int32(name='EnableScheduledReboot'),
  enableScheduledShutdown?: int32(name='EnableScheduledShutdown'),
  enableSwitchPersonal?: int32(name='EnableSwitchPersonal'),
  enableWlan?: int32(name='EnableWlan'),
  idleTimeout?: int32(name='IdleTimeout'),
  idleTimeoutAction?: int32(name='IdleTimeoutAction'),
  name?: string(name='Name'),
  powerButtonDefine?: int32(name='PowerButtonDefine'),
  powerButtonDefineForAs?: int32(name='PowerButtonDefineForAs'),
  powerButtonDefineForNs?: int32(name='PowerButtonDefineForNs'),
  powerOnBehavior?: int32(name='PowerOnBehavior'),
  scheduledReboot?: string(name='ScheduledReboot'),
  scheduledShutdown?: string(name='ScheduledShutdown'),
  settingLock?: int32(name='SettingLock'),
  terminalPolicyId?: string(name='TerminalPolicyId'),
}

model UpdateTerminalPolicyResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdateTerminalPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateTerminalPolicyResponseBody(name='body'),
}

/**
 * @summary 修改终端策略
 *
 * @param request UpdateTerminalPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateTerminalPolicyResponse
 */
async function updateTerminalPolicyWithOptions(request: UpdateTerminalPolicyRequest, runtime: Util.RuntimeOptions): UpdateTerminalPolicyResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.backgroundModeTitle)) {
    body['BackgroundModeTitle'] = request.backgroundModeTitle;
  }
  if (!Util.isUnset(request.displayLayout)) {
    body['DisplayLayout'] = request.displayLayout;
  }
  if (!Util.isUnset(request.displayResolution)) {
    body['DisplayResolution'] = request.displayResolution;
  }
  if (!Util.isUnset(request.displayScaleRatio)) {
    body['DisplayScaleRatio'] = request.displayScaleRatio;
  }
  if (!Util.isUnset(request.enableAutoLockScreen)) {
    body['EnableAutoLockScreen'] = request.enableAutoLockScreen;
  }
  if (!Util.isUnset(request.enableAutoLogin)) {
    body['EnableAutoLogin'] = request.enableAutoLogin;
  }
  if (!Util.isUnset(request.enableBackgroundMode)) {
    body['EnableBackgroundMode'] = request.enableBackgroundMode;
  }
  if (!Util.isUnset(request.enableBluetooth)) {
    body['EnableBluetooth'] = request.enableBluetooth;
  }
  if (!Util.isUnset(request.enableModifyPassword)) {
    body['EnableModifyPassword'] = request.enableModifyPassword;
  }
  if (!Util.isUnset(request.enableScheduledReboot)) {
    body['EnableScheduledReboot'] = request.enableScheduledReboot;
  }
  if (!Util.isUnset(request.enableScheduledShutdown)) {
    body['EnableScheduledShutdown'] = request.enableScheduledShutdown;
  }
  if (!Util.isUnset(request.enableSwitchPersonal)) {
    body['EnableSwitchPersonal'] = request.enableSwitchPersonal;
  }
  if (!Util.isUnset(request.enableWlan)) {
    body['EnableWlan'] = request.enableWlan;
  }
  if (!Util.isUnset(request.idleTimeout)) {
    body['IdleTimeout'] = request.idleTimeout;
  }
  if (!Util.isUnset(request.idleTimeoutAction)) {
    body['IdleTimeoutAction'] = request.idleTimeoutAction;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.powerButtonDefine)) {
    body['PowerButtonDefine'] = request.powerButtonDefine;
  }
  if (!Util.isUnset(request.powerButtonDefineForAs)) {
    body['PowerButtonDefineForAs'] = request.powerButtonDefineForAs;
  }
  if (!Util.isUnset(request.powerButtonDefineForNs)) {
    body['PowerButtonDefineForNs'] = request.powerButtonDefineForNs;
  }
  if (!Util.isUnset(request.powerOnBehavior)) {
    body['PowerOnBehavior'] = request.powerOnBehavior;
  }
  if (!Util.isUnset(request.scheduledReboot)) {
    body['ScheduledReboot'] = request.scheduledReboot;
  }
  if (!Util.isUnset(request.scheduledShutdown)) {
    body['ScheduledShutdown'] = request.scheduledShutdown;
  }
  if (!Util.isUnset(request.settingLock)) {
    body['SettingLock'] = request.settingLock;
  }
  if (!Util.isUnset(request.terminalPolicyId)) {
    body['TerminalPolicyId'] = request.terminalPolicyId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateTerminalPolicy',
    version = '2021-04-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改终端策略
 *
 * @param request UpdateTerminalPolicyRequest
 * @return UpdateTerminalPolicyResponse
 */
async function updateTerminalPolicy(request: UpdateTerminalPolicyRequest): UpdateTerminalPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateTerminalPolicyWithOptions(request, runtime);
}

